ineed to implement this in c#