started to integrate Dario's temporal formulas
and further optimised TemporalEventLinearPiecewise