fixed up hardcore serialization, added test.