adding min/max