modify the alg,but still not work