added testing code to show how to get a sorted array of timestamps