rename function
calc e-out
limit the number of iterations