moved template from html to js