Adding P parameter for phrase dimension.