Converted to .NET 4.5