added windows compatibility (yet to be tested)