Added update functions to the database