working out serialization format and protocol layers