updated code on update and delete