Used shunting rule, first change to the original code, discard earlier commits on this subject