fixed a few mistakes, changed source language to c#