refactored, and updated readme