added min/max setting