added code for edit,update and delete actions