change the algorithm