separated tstat and schedule javascript