Added TS calculation