#include<bits/stdc++.h>
using namespace std;
const int N=1e6+5;
const int mod=1e9+7,Inv2=(mod+1)/2;
int dfn[N],Low[N],stk[N],col[N],p[N];
int dp1[N],g1[N],siz[N],Pow[N],Eu[N],Ev[N];
int n,m,c,top,tim,ans;
vector<int> G[N];
void Tarjan(int u, int fa){
	dfn[u]=Low[u]=++tim; stk[++top]=u;
	for (int v:G[u])
		if (!dfn[v]) Tarjan(v,u),Low[u]=min(Low[u],Low[v]);
		else if (v!=fa) Low[u]=min(Low[u],dfn[v]);
	if (Low[u]==dfn[u]){
		c++;
		while (stk[top]!=u) p[c]++,col[stk[top--]]=c;
		p[c]++,col[stk[top--]]=c;
	}
}
void dfs(int u, int f){
	int s=0; siz[u]=1;
	dp1[u]=(Pow[p[u]]+mod-1)%mod;
	for (int v:G[u]) if (v!=f){
		dfs(v,u); s++,siz[u]+=siz[v];
		dp1[u]=1ll*dp1[u]*(1ll*Inv2*(dp1[v]+g1[v])%mod+1)%mod;
		g1[u]=(g1[u]+1ll*Inv2*(dp1[v]+g1[v])%mod)%mod;
	}
	if (s>=2){
		int r1=1;
		for (int v:G[u]) if (v!=f) r1= 1ll*r1*(1ll*Inv2*(dp1[v]+g1[v])%mod+1)%mod;
		for (int v:G[u]) if (v!=f) r1=(r1+mod-(1ll*Inv2*(dp1[v]+g1[v])%mod)%mod)%mod;
		dp1[u]=(1ll*dp1[u]+1ll*r1+mod-1)%mod;
	}
}
int main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	scanf("%d%d",&n,&m); Pow[0]=1;
	for (int i=1; i<=m; i++){
		scanf("%d%d",&Eu[i],&Ev[i]);
		Pow[i]=1ll*Pow[i-1]*2%mod;
		G[Eu[i]].push_back(Ev[i]);
		G[Ev[i]].push_back(Eu[i]);
	}
	Tarjan(1,0);
	for (int i=1; i<=n; i++) G[i].clear();
	for (int i=1; i<=m; i++)
		if (col[Eu[i]]!=col[Ev[i]]){
			G[col[Eu[i]]].push_back(col[Ev[i]]);
			G[col[Ev[i]]].push_back(col[Eu[i]]);
		}
	dfs(1,0);
	for (int i=1; i<=c; i++) ans=(ans+1ll*Pow[m]*dp1[i])%mod;
	printf("%d\n",ans);
	return 0;
}
/*
15 19
1 2
1 3
2 3
3 4
3 5
4 5
4 6
6 7
7 8
8 9
9 6
9 10
9 11
10 12
12 13
13 10
11 14
14 15
15 11

4 3
1 2
1 3
1 4
*/