Lab2 serialisation exercise