Adding delete function in back end.