how automated needle valves work