added solution to the challenge problem