problem1.7 solved