added possibility to assign template vars