Setup function added for templates