Refactored command to commandBlock