algorithm changed