done for update and delete