threaded  parsing tags, nd refs, and relation refs
fixed threading issue