added code for problem 57