added win32 compatibility