algorithm

algorithm changed