refactored into module
Merge pull request #2 from nizmox/master

refactored into module