added code for problem 15