added Gate.cs