replace template by class name in the tamplates.