Added in serialization function to keep track of already_done.