edit p1 code