added tests for db, not done yet