moved templates into the JS-code