implement relationship option for serialization