spearate timseries extraction as in another function