update algorithm, faster