Added ability to repeat (loop) portions of a query + associated tests