enhanced handlebars implementation