delete function implemented