added maxiters and tolerance to gmres call