add wrap function with