tests for limiting descendants and ancestors by generations, and initial code for ancestors