Working on the function template