Solution for Problem #57