reintegrated the old serialization stuff