Better refactor
Re-implement max iterations