Code to handle different versions of PEC