start rewriting csharp macros