Solution for Problem 13