move timer and event calls into the timeout