add more template functions.