Refactring send function for PEP8 compliance.