with-db not necessary. can just use with-open
fix tests to use with-open