added ts code