template and code changes