use pmax pmin