Add code for problem #13