Code modified to work on windows platform

Code modified to work on windows platform