working serialisation and primitive documentation