added new code for problem 47