commented out unused variable endDate