changed default value for nLoops