fixed csharp solution