Add readResolve method