finished refactoring zsh