Adding solution for challenge 2.