more hacking. check-in before splitting into separate files