template now accepts custom variables