split off functions, add tabname function to change terminal title