refactoring and new commands