add while loop to keep reading in date