Part of the algorithm