code for the MPPG project