Added delete function and date parameter