improved variable names in data loop and deleted console.log(startDate)