expand 1d gate with refGate. close #25