encode message that being sent out as well