Home work #4 solved