made template cloneable