work in progress - need to add test db
tests passing
remove cruft