adding my code for problem 3.15