Perhaps delay(1) would work
In other words, my code works, but is not as efficient as yours.
Many thanks for the help, sir.