update code for windows platform building