algorithm for update op completed