full rework and added zsh support