Added an explicit loop, and added a run() entry method with 2311bab2d91a0a2b72d777219387b36ac50590e1