completes loopingATriangle