Updated getAncestors, with promises.