changed coroutine sleeping to graphics.present instead to improve mouse input