refactored code to class
changed readme