convert message to bytes before sending