worked on delete function.