test the db functions