determining and setting proper flow rate