encode parent ref ids on output