added functions to add template functions