Added pmax, and got rid of gt and lt