#include<bits/stdc++.h>
#define ci const int&
using namespace std;
const int N=5e5+10,M=1e6+10,mod=1e9+7,i2=(mod+1)/2;
struct edge{
	int t,nxt;
}e[M<<2];
int n,m,u,v,be[N],cnt,b2[N],inc[N],tt,num[N],dp[N][2],p2[M],ans;
int q[N],sz,nw,iq[N],dfn[N],low[N],vis[N];
char tc;
void getc(int&x){
	x=0;
	while(!isdigit(tc=getchar()));
	while(isdigit(tc))x=(x<<3)+(x<<1)+tc-'0',tc=getchar();
}
void add(ci x,ci y){
	e[++cnt]=(edge){y,be[x]},be[x]=cnt;
}
void add2(ci x,ci y){
	e[++cnt]=(edge){y,b2[x]},b2[x]=cnt;
}
void dfs(ci x,ci fa){
	dfn[x]=low[x]=++nw,iq[x]=1,q[++sz]=x;
	for(int i=be[x];i;i=e[i].nxt)if(e[i].t!=fa){
		if(!dfn[e[i].t])dfs(e[i].t,x),low[x]=min(low[x],low[e[i].t]);
		else if(iq[e[i].t])low[x]=min(low[x],dfn[e[i].t]);
	}
	if(dfn[x]==low[x]){
		++tt;
		while(q[sz]!=x)inc[q[sz--]]=tt,++num[tt];
		inc[q[sz--]]=tt,++num[tt];
	}
}
void Merge(int*x,int*y){
	x[1]=(x[1]+1ll*(x[1]+x[0])*(y[1]+y[0])%mod*i2)%mod;
	x[0]=(x[0]+1ll*(y[1]+y[0])*i2)%mod;
}
void DP(ci x){
	dp[x][0]=p2[num[x]]-1,dp[x][1]=0;
	vis[x]=1;
	for(int i=b2[x];i;i=e[i].nxt)if(!vis[e[i].t]){
		DP(e[i].t),Merge(dp[x],dp[e[i].t]);
	}
	ans=(-1ll+ans+dp[x][1]+p2[num[x]])%mod;
	//cout<<"DP "<<x<<"="<<dp[x][0]<<","<<dp[x][1]<<"\n";
}
int main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	getc(n),getc(m),p2[0]=1;
	for(int i=1;i<=m||i<=n;++i)(p2[i]=(p2[i-1]<<1))>=mod?p2[i]-=mod:0;
	for(int i=1;i<=m;++i)getc(u),getc(v),add(u,v),add(v,u);
	dfs(1,0);
	for(int i=1;i<=n;++i)for(int j=be[i];j;j=e[j].nxt)if(inc[i]!=inc[e[j].t])add2(inc[i],inc[e[j].t]);
	DP(1);
	printf("%lld",1ll*ans*p2[m]%mod);
	return 0;
}
