Serialization lecture code