added codes to text_by_time