can this be done more generic, for code that does not use timestamps, just streaming sequences of data?