code refactor
Merge pull request #91 from malakasilva/master

code refactor