some changes with templating