main algorithm is more conformant to MR paradigm