depth, isvalid, isancestor