added code for problem 61