Avangrid investment in CT natural gas, UI, depends on ruling