merging template and signing.