successfully implemented the delete function
Added delete function