Added a possibility to slow the algorithm