first pass at having template.render function working