modify send function