HW#6 solved