refactored the code
Merge pull request #9 from firzhan/master

refactored the code