added new template functions