Added ancestor matching