Add var template and use clone