refactored ex commands