code re-factoring for TimeText