Improvement of the algorithm. Modification of the shared data.