renamed pointReduction2d to cleanfigure, make it more general purpose