did some work to make it work on windows