implement a hashset that is capable of serialization