refactoring Command en enum