write display_time in helper