refactoring code and readme