added reflection to enable serialization of messages