now templates replace only nodes that have changed