rewire ancestors refactored.