Added template function
Fixes