Finish the implementation of GHOG (C# version)