creating P1 & P2