bunch of changes to support zsh