HW#9 solved