Added template functions