squaring PGM
even better pgm shape