Moved code in pyTimeSeries