Really ugly code
A bit more presentable
Merge pull request #4 from AmaanC/master

AmaanC's submission