serialization improvements