Edited to work with Visual Studio