fixed implementation
tuned number of iterations