Update for new algorithm.