refactored and succeed the send() method