Filled in description of algorithm.