Merge pull request #7 from chatooz/arnav

reduce redundant code