Updated template to use vars