Add functions for 2nd challenge
Add tests for set 1 challenge 2