could this be done with a heredoc?