solution for problem 56