modify delay from busy looping to interrupt ticking