fix test and alg1