serialize and deserialization working