trying to get the database to work correctly