complete the database class