with sersialization and deserialization