Changed the waitFrames loop
Updated based on comments
Merge pull request #4 from cbcoolbox/master

Changed the waitFrames loop