Solution for Problem #10