todo - convert to C# / Powershell semantics