refactoring to bash-goodies