added min and max inflwo