add write function for downward message.