Add update and delete function.