add message serialization interface