Added Loops and tests.