cares_wrap: now use FunctionTemplate