update and delete record