use message serialization for python bindings