template change detection