reset and send function