refactoring of bash-files