improved chrome loop

http://stackoverflow.com/a/7335517/98763