#include <bits/stdc++.h>
#define rep(i,j,k) for(int i = (j);i <= (k);i++)
#define per(i,j,k) for(int i = (j);i >= (k);i--)
#define eb emplace_back
#define pii pair <int,int>
#define mkp make_pair
#define ll long long
#define ull unsigned long long
#define mod 1000000007
#define inv2 500000004ll
using namespace std;

void chkmin(int &x,int y){
	if(x > y) x = y;
}

void chkmax(int &x,int y){
	if(x < y) x = y;
}

void chkmin(ll &x,ll y){
	if(x > y) x = y;
}

void chkmax(ll &x,ll y){
	if(x < y) x = y;
}
int n,m;
int _u[1000005],_v[1000005];

int cnt = 1;
int head[500005];
struct eg{
	int to,nxt;
}edge[2000005];

void make(int u,int v){
	edge[++cnt].to = v;
	edge[cnt].nxt = head[u];
	head[u] = cnt;
}

int dfn[500005],low[500005];

int bin[500005],siz[500005];
int fnd(int x){
	if(bin[x] == x) return x;
	return bin[x] = fnd(bin[x]);
}

void mrg(int u,int v){
	u = fnd(u);v = fnd(v);
	assert(u != v);
	bin[u] = v;
	siz[v] += siz[u];
}

void tarjan(int u,int I){
	dfn[u] = low[u] = ++cnt;
	for(int i = head[u];i;i = edge[i].nxt){
		int v = edge[i].to;
		if(i == (I ^ 1)) continue;
		
		if(!dfn[v]){
			tarjan(v,i);
			chkmin(low[u],low[v]);
			if(low[v] <= dfn[u]) mrg(u,v);
		}else{
			chkmin(low[u],dfn[v]);
		}
	}
}
ll P[500005],val[500005];
ll dp[500005],ans;

void dfs(int u,int f){
	ll cur = 1,sum = 0;
	for(int i = head[u];i;i = edge[i].nxt){
		int v = edge[i].to;
		if(v == f) continue;
		dfs(v,u);
		cur = cur * (dp[v] * inv2 % mod + 1) % mod;
		sum += dp[v] * inv2;
		sum %= mod;
	}
	dp[u] = (1 + val[u]) * cur % mod - 1;
	
	ans += val[u] * cur;
	ans %= mod;
	ans += (cur - sum - 1);
	ans %= mod;
}

void qread(int &x){
	x = 0;
	char ch = getchar();
	while(ch < '0' || ch > '9') ch = getchar();
	while(ch >= '0' && ch <= '9'){
		x = x * 10 + ch - '0';
		ch = getchar();
	}
}

int main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	qread(n);qread(m);
	rep(i,1,m){
		qread(_u[i]);qread(_v[i]);
		make(_u[i],_v[i]);make(_v[i],_u[i]);	
	}
	P[0] = 1;
	rep(i,1,n) P[i] = P[i - 1] * 2 % mod;
	
	rep(u,1,n){
		bin[u] = u;
		siz[u] = 1;
	}
	cnt = 0;
	tarjan(1,0);
	
	cnt = 0;
	memset(head,0,sizeof(head));
	
	rep(i,1,m){
		_u[i] = fnd(_u[i]);_v[i] = fnd(_v[i]);
		if(_u[i] == _v[i]) continue;
		make(_u[i],_v[i]);make(_v[i],_u[i]);	
	}
	rep(u,1,n) if(bin[u] == u) val[u] = (P[siz[u]] + mod - 1) % mod;
	//int tmp = 0;
	//rep(u,1,n) if(bin[u] == u) tmp++;
	//cerr << tmp << endl;
	int rt = fnd(1);
	dfs(rt,0);
	if(ans < 0) ans += mod;
	rep(i,1,m) ans = ans * 2 % mod;
	printf("%lld\n",ans);
	return 0;
}
