Change the similar algorithm.