serialization and template renaming