update markup in templates