added handling delete