adding the database functionality