work in progress, fixing error in pedigre selection