use maxiter variable, so that 200 and 300 aren't hardcoded

and out of sync!  was getting several cases where max iterations were
hit (at 300) but my trip code was checking for 200.