optimize output by adjusting where sleep is