Changed API's to work with multiple timeseries

Signed-off-by: Maxim Osipov <maxim.osipov@gmail.com>