updated to work on windows