first commit
1st fix
2nd fix
Merge pull request #1 from Allenardo/master

Merging devan's code after suggesting improvements.