check limits and use pmin.int