#include<bits/stdc++.h>
using namespace std;

#define int long long
#define PB emplace_back
#define siz(a) ((int) (a.size()))
#define vi vector<int>
#define ll long long
#define rep(i, a, b) for (int i = (a); i <= (b); ++i)
#define per(i, a, b) for (int i = (a); i >= (b); --i)

const int N = 1e6, mod = 1e9 + 7;
int a, b, c, dfn[N + 5], low[N + 5], id, siz[N + 5], scc, top, sk[N + 5], bel[N + 5], e[N + 5],
	f[N + 5], g[N + 5], h1[N + 5], h2[N + 5], pw[N + 5], E[N + 5];
vi st[N + 5], sq[N + 5];

void dfs(int n, int fa) {
	dfn[n] = low[n] = ++id;
	sk[++top] = n;
	int cnt = 0;
	for(int v : st[n]) {
		if(!dfn[v]) {
			dfs(v, n);
			low[n] = min(low[n], low[v]);
			if(low[v] > dfn[n]) {
				int m = -1;
				++scc;
				while(m != v) {
					m = sk[top--];
					bel[m] = scc;
					++siz[scc];
				}
			}
		}
		else {
			if(v == fa && !cnt) ++cnt;
			else low[n] = min(low[n], dfn[v]);
		}
	}
}

void Dfs(int n, int fa) {
	f[n] = pw[siz[n]] - 1;
	g[n] = 1;
	(f[n] *= pw[e[n]]) %= mod, (g[n] *= pw[e[n]]) %= mod;
	E[n] = e[n];
	for(int v : sq[n]) {
		if(v == fa) continue;
		Dfs(v, n);
		E[n] += E[v] + 1;
		f[n] = (f[n] * (f[v] + h1[v] + h2[v]) % mod + f[n] * g[v] * 2) % mod;
		h2[n] = (h1[n] * (f[v] + h1[v] + h2[v]) % mod + h2[n] * g[n] * 2) % mod;
		h1[n] = (g[n] * (f[v] + h1[v] + h2[v]) % mod + h1[n] * g[n] * 2) % mod;
		g[n] = g[n] * g[v] * 2 % mod;
	}
}

signed main() {
	freopen("barrack.in", "r", stdin);
	freopen("barrack.out", "w", stdout);
	ios::sync_with_stdio(0);
	cin.tie(0), cout.tie(0);
	pw[0] = 1;
	rep(i, 1, N) pw[i] = pw[i - 1] * 2 % mod;
	cin >> a >> b;
	int x, y;
	rep(i, 1, b) {
		cin >> x >> y;
		st[x].PB(y);
		st[y].PB(x);
	}
	dfs(1, 0);
	{
		int m = -1;
		++scc;
		while(m != 1) {
			m = sk[top--];
			bel[m] = scc;
			++siz[scc];
		}
	}
//	rep(i, 1, a) cout << bel[i] << " \n"[i == a];
	rep(i, 1, a) for(int v : st[i]) {
		if(bel[v] == bel[i]) ++e[bel[i]];
		else sq[bel[i]].PB(bel[v]);
	}
	rep(i, 1, scc) e[i] /= 2;
	Dfs(1, 0);
	int ans = 0;
	rep(i, 1, scc) {
		(ans += pw[b - E[i]] * (h2[i] + f[i])) %= mod;
//		cout << E[i] << endl;
	}
	cout << ans;
	return 0;
}