put database methods in the database class