add code for chapter9 on windows