refactoring commands - stage1