send function fixed