added time_series_fun