testing the database functionality