Added template function