made arrangments for Delete function and update function