tests pass. db added
refactored. one test fails