Update template functions