Add a test for loops
Document loops