Solution for Problem #43