ensure data points are in chronological order