Applied hw6 changes