use uint for maxIter