moving tmux function into a script