add support for complicated papers that can result in circular references
Merge pull request #18 from zcourts/master

add support for complicated papers that can result in circular references