Reducing number of iterations