refactoring command run