added loops to test script