new function template has bash heredoc interpretting variables