starting code for PMI, not finished yet