Change the strange algorithm