Home work #2 solved