made all tests run on each frame render so setTimeout is only used for flashing where timing isn't critcal