c#: refactored send