refs #7144 Latest version of the alg and unit test.