Timing is not the problem
putting sleeps everywhere is not going to solve it.