adding the looping for the iframe loading wait