add support for complicated papers that can result in circular references