added while loop to tnrs fxn so that repeated calls are made to grab data so that a Sys.sleep call is avoided