simplify the wrapper declaration using template