updating the tests to use _database instead of db