#include<bits/stdc++.h>
using namespace std;
#define int long long
inline int read() 
{
	int sum = 0, nega = 1; char ch = getchar();
	while(ch > '9' || ch < '0') {if(ch == '-') nega = -1; ch = getchar();}
	while(ch <= '9' && ch >= '0') sum = sum * 10 + ch - '0', ch = getchar();
	return nega * sum;
}
const int N = 2e6 + 9, mod = 1e9 + 7, inv2 = (mod + 1) / 2;
vector<int> G[N], T[N];
int id[N], dfn[N], tim, low[N], cnt, pown[N], top;
int n, m, t; 
int sta[N], siz[N];
int dp1[N], dp2[N];
int ans;
bool vis[N];
inline void dfs1(int u, int f) 
{
	dfn[u] = ++tim; low[u] = dfn[u], sta[++top] = u;
	for (auto v : G[u])
	{
		if(!dfn[v]) dfs1(v, u), low[u] = min(low[u], low[v]);
		else if(v != f) low[u] = min(low[u], dfn[v]); 
	}
	if(dfn[u] == low[u]) 
	{
		t++;
		while(sta[top] != u) 
			vis[sta[top]] = 1, id[sta[top]] = t, top--, siz[t]++; 
		id[u] = t, top--; siz[t]++; vis[u] = 1;
	}
	return ;
}
inline void dfs2(int u, int f) 
{
	int s = 1, t = 0;
	dp1[u] = pown[siz[u]];
	for (auto v : T[u]) 
		if(v != f)
		{
			dfs2(v, u);
			s = s * (dp1[v] * inv2 % mod + 1) % mod; 
			t = (t + dp1[v] * inv2) % mod;
		}
	dp1[u] = (dp1[u] * s - 1 + mod) % mod;
	ans = (ans + dp1[u] - t + mod) % mod;
}
signed main()
{
	freopen("barrack.in", "r", stdin);
	freopen("barrack.out", "w", stdout);
	n = read(), m = read();
	pown[0] = 1;
	for (int i = 1; i <= n; i++) pown[i] = pown[i - 1] * 2 % mod;
	int qwq = 1;
	for (int i = 1; i <= m; i++) 
	{
		int x = read(), y = read();
		G[x].push_back(y), G[y].push_back(x);
		qwq = qwq * 2 % mod;
	} 
	dfs1(1, 0); 
	for (int i = 1; i <= n; i++) 
		for (auto v : G[i]) 
		{
			int x = id[i], y = id[v];
			if(x != y) T[x].push_back(y);
		}
	dfs2(1, 0);
	cout << ans * qwq % mod << endl;
	return 0;
}
