adding functions to generate time series and changing modes again