refactoring and adding help command