updated for .net