updated sample to use Date object for timestamps