realize algorithm basically, but it cost too much time