add clone to Template prototype