added docs for setLoops()