solved in C#