update algorithm for background workers