upward function

performs the upward step of the peeling algorithm of a pedigree