use heredocs for templating

closes #6