Tested on windows with vs 2010