refactoring Command package