main changes work on Windows

This commit is aimed at testing on Mac OS X