Fixed HW5 Problem 7