use waitTime variable