making the database work