removed the attempt at a C# implementation