more work on the .net wrapper