modified code such that it ran on windows