fix #17 -- this needs good testing before release...