correct ancestors determination