added description of the algorithm