#include<bits/stdc++.h>
#define int unsigned long long
const int mod=1e9+7;
const int hm=5e8+4;
using namespace std;
int Read(){
	char ch=getchar();
	int x=0;
	if(ch==EOF) return 0;
	while(ch<'0'||ch>'9') ch=getchar();
	if(ch==EOF) return 0;
	while(ch>='0'&&ch<='9') x=(x<<3)+(x<<1)+(ch^48),ch=getchar();
	return x;
}
int h[500005],nxt[2000005],to[2000005];
int cnt;
bool done[500005],vis[500005];
int dfn[500005],low[500005];
void link(int x,int y){
	nxt[++cnt]=h[x];
	h[x]=cnt;
	to[cnt]=y;
	nxt[++cnt]=h[y];
	h[y]=cnt;
	to[cnt]=x;
	return ;
}
int h2[500005],nxt2[2000005],to2[2000005];
void link2(int x,int y){
	nxt2[++cnt]=h2[x];
	h2[x]=cnt;
	to2[cnt]=y;
	return ;
}
int num,res;
int s[500005];
int grp[500005];
int haha=0;
int stk[500005];
int cont;
void dfs(int x,int f){//tarjan
	stk[++haha]=x;
	vis[x]=1;
	dfn[x]=low[x]=++num;
	for(int i=h[x];i;i=nxt[i]){
//		cout<<i << ' ' << to[i] << endl;
		if(to[i]==f) continue;
		if(!vis[to[i]]){
			dfs(to[i],x);
			low[x]=min(low[x],low[to[i]]);
		}else if(!done[to[i]])
			low[x]=min(low[x],low[to[i]]);
	}
	if(low[x]==dfn[x]){
		res++;
		while(stk[haha]!=x){
			grp[stk[haha]]=res,done[stk[haha]]=1,haha--,s[res]++;
		} 
		grp[stk[haha]]=res,done[stk[haha]]=1,haha--,s[res]++;
	}
}
int times2[2000005];//2^i
int dp[500005][2];
int m;
int ans;
int dfs2(int x,int f,int lst,int lst2){//dp on the tree
	ans+=(lst+lst2)*hm%mod*(times2[s[x]]-1)%mod,ans%=mod;
//	cout << x << ' ' << ans << ' ' << lst<< endl;
	for(int i=h2[x];i;i=nxt2[i]){
		if(to2[i]==f) continue;
		dfs2(to2[i],x,lst*hm%mod*times2[s[x]]%mod+lst2*hm%mod*(times2[s[x]]-1)%mod,lst2);
	}
	return ans;
}
signed main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	int n=Read();m=Read();
	for(int i=1;i<=m;i++){
		int x=Read(),y=Read();
		link(x,y);
	}
	dfs(1,0);
	times2[0]=1;
	for(int i=1;i<=m+1;i++) times2[i]=2*times2[i-1]%mod;
	dp[0][0]=times2[m+1];
	int ans=0;
	cnt=0;
	for(int i=1;i<=n;i++)
		for(int j=h[i];j;j=nxt[j])
			if(grp[i]!=grp[to[j]]){
				link2(grp[i],grp[to[j]]);
//				cout << grp[i] << ' ' << grp[to[j]] << endl;
			}
	
	/*
	for(int i=1;i<=res;i++){
		cout << s[i] << endl;
		for(int j=0;j<res;j++){
			dp[i][j+1]+=dp[i-1][j]*hm%mod*times2[s[i]]%mod,dp[i][j+1]%=mod;
		}
	}
//	cout << dp[1][1] << ' ' << dp[0][0] << endl;
	for( int i=1;i<=res;i++) ans+=dp[res][i],ans%=mod;
	*/
	printf("%lld\n",dfs2(1,0,0,times2[m+1]));
	return 0;
}
/*
tarjan \/
liang bei kong jian \/
pan huan\/
how to caculate answer Ahhhhh
*/

