more template functions