added two functions one to stack time segments and another to calculate ...

...standard deviations