Added function timesSeries + unit-test