p statement and rearrange