working on the database