Updated the code to make results check easier to determine, also implemented a better iteration of setTimeout to avoid making too many request