Description of the algorithm