Combine delete function into the list