fix syxtax, re-organize code in win32