updated to work with VS2013.