added comments and fixed #18
Merge pull request #19 from voidabhi/issue-fix

added comments and fixed #18