Changes the algorithm