set maxIterations to 500