updating code to work on Windows