updated find_cliques to insert 1 document