updating the db