Added def on_clock_tick