changes to make the pasring and serialization really order independent