Some more code ... getting it to work in Visual Studio