added js templating