updated for .NET 4.5