added min and max values