Small docstring would be appreciated, because this is one of core points of the algorithm.