        dl = computeDescriptionLength(dlmode=dlmode, gtype=gtype, V=G.number_of_nodes(), W=pattern.NCount+1, kw=params['kw_new'], q=q)
    elif mode == 2:
        best_node, params = max(candidates.items(), key=lambda x: computeInterestingness( AD( pattern.ECount+x[1]['kw_surplus'], pattern.expectedEdges + x[1]['mu_w_surplus'] ),\
            computeDescriptionLength( dlmode=dlmode, gtype=gtype, V=G.number_of_nodes(), W=pattern.NCount+1, kw=pattern.ECount+x[1]['kw_surplus'], q=q, kws=pattern.kws+x[1]['kws_surplus'], isSimple = isSimple ) ) )
        params['mu_w_new'] = pattern.expectedEdges + params['mu_w_surplus']
        params['kw_new'] = pattern.ECount + params['kw_surplus']
        params['kws_new'] = pattern.kws + params['kws_surplus']