add some alg