added windows sleep to make the animation smoth on every hardware