#include <bits/stdc++.h>

using namespace std;

namespace sub1 {
const int N = 500001;
const int M = 1000001;
const int P = 1000000007;
const int I2 = 500000004;
vector<int> raw_e[N], mbr[N], e[N];
int raw_n, m, u, v, tim, dfn[N], low[N], tp, st[N], n, bel[N], tmp[N], m1;
int sze[N], ss[N], se[N];
long long ans, f[N], p2[M], ip2[M];

void tj(int x, int father) {
	dfn[x] = low[x] = ++tim;
	st[tp++] = x;
	for (int i : raw_e[x])
		if (i != father) {
			if (!dfn[i]) tj(i, x);
			low[x] = min(low[x], low[i]);
		}
	if (dfn[x] == low[x]) {
		++n;
		do {
			mbr[n].push_back(st[--tp]);
			bel[st[tp]] = n;
		} while (st[tp] != x);
	}
}

void dfs(int x, int father) {
	long long mul = 1, sum = 0;
	ss[x] = sze[x] = mbr[x].size();
	for (int i : e[x])
		if (i != father) {
			dfs(i, x);
			mul = mul * (f[i] + 1) % P;
			sum = (sum + f[i]) % P;
			ss[x] += ss[i];
			se[x] += se[i] + 1;
		}
	f[x] = (mul - 1 + (p2[sze[x]] - 1) * ip2[ss[x]] % P * p2[se[x]]) % P;
	ans = (ans + (p2[sze[x]] - 1) * ip2[raw_n] % P * p2[m1] + (mul - 1) *
			(p2[sze[x]] - 1) % P * ip2[raw_n - ss[x] + sze[x]] % P * p2[m1 - se[x]] +
			(mul - 1 - sum) * ip2[raw_n - ss[x] + sze[x]] % P * p2[m1 - se[x]]) % P;
}

void main() {
	scanf("%d%d", &raw_n, &m);
	p2[0] = ip2[0] = 1;
	for (int i = 1; i < M; ++i) {
		p2[i] = p2[i - 1] * 2 % P;
		ip2[i] = ip2[i - 1] * I2 % P;
	}
	for (int i = 0; i < m; ++i) {
		scanf("%d%d", &u, &v);
		raw_e[u].push_back(v);
		raw_e[v].push_back(u);
	}
	tj(1, 0);
	for (int i = 1; i <= n; ++i) {
		int l = 0;
		for (int j : mbr[i])
			for (int k : raw_e[j])
				tmp[l++] = bel[k];
		sort(tmp, tmp + l);
		l = unique(tmp, tmp + l) - tmp;
		for (int j = 0; j < l; ++j)
			if (tmp[j] != i)
				e[i].push_back(tmp[j]);
		m1 += l;
	}
	m1 /= 2;
	dfs(1, 0);
	printf("%lld\n", (ans * p2[m - m1] % P * p2[raw_n] % P + P) % P);
}
}

int main() {
	freopen("barrack.in", "r", stdin);
	freopen("barrack.out", "w", stdout);
	sub1::main();
	fclose(stdin);
	fclose(stdout);
	return 0;
}
