generic codes for building amd running our full PGM