refactored times package into two classes: TimeSeries and IntensityFunctions