This my solution for the challenge.