added runOnce function
added results
switched to while loop