Delay loop now works