libertytree implementation in C#