move timer to the top, and remove async