modified first step, second step, and resulting selected sums