change test to database