Update algorithm
Update algorithm