hacking together test for current interface
adding tests, fixed a few bugs...