moving script template call up to HTML location