Add alternate code for p4