Added code for problem 13