Refactored a command