updating and using templates