refactor Shell