bug in struct2array, replaced with custom time series extraction