added some handlebars.js logic