Wait time to run added 1500 milliseconds

Inside for..loop condition, avoid to use length()