add animation, when template changes