updated to new Template.dynamic API