update one algorithm