Added the work section of the algorithm.