HW#8 solved