add some more functions to operate the database