message serialiser
client implementation