extended with search for cliques