PPA prototype code