updated readme
refactored code into module