HW #7 solved