Updated for visual studio 2012