Added update and delete function