fix for hw6 part 2