addded some functions to edit the database