added win32 portability