fix for hw6 part I