My solution
Merge pull request #658 from viparthasarathy/patch-3

My solution