hw6 made changes for ex3