#include<bits/stdc++.h>
#define nm 700000
using namespace std;
const long long p=1000000007;
void read(long long &n){
	char ch=getchar();
	long long k=0,f=1;
	while(ch<'0' or ch>'9'){
		if(ch=='-')f=-1;
		ch=getchar();
	}
	while(ch>='0' and ch<='9'){
		k=k*10+ch-'0';
		ch=getchar();
	}
	n=f*k;
} 
struct data{
	long long next,to;
}a[nm*3],lx[nm*3];
long long num[nm];
long long s,b,c,d,e,f[nm],g[nm],h,x,y,t,cnt,dfn[nm],lo[nm];
long long hs[nm],tt;
void jiajia(long long x,long long y){
	a[++t].to=y;
	a[t].next=g[x];
	g[x]=t;
}
void jiajia2(long long x,long long y){
	lx[++tt].to=y;
	lx[tt].next=hs[x];
	hs[x]=tt;
}
long long min(long long a,long long b){
	return a<b?a:b;
}
long long q[nm*2],pigu,co[nm];
void tarjin(long long n,long long m){
	dfn[n]=lo[n]=++cnt;
	q[++pigu]=n;
	for(int i=g[n];i;i=a[i].next){
		if(a[i].to!=m){
			if(!dfn[a[i].to]){
				tarjin(a[i].to,n);
				lo[n]=min(lo[n],lo[a[i].to]);
			}
			else{
				lo[n]=min(lo[n],lo[a[i].to]);
			}
		}
	}
	if(dfn[n]==lo[n]){
		s++;
		while(q[pigu]!=n){
			co[q[pigu]]=s;
			num[s]++;
			pigu--;
		}
		num[s]++;
		co[q[pigu]]=s;
		pigu--;
	}
}
long long Pow(long long a,long long b){
	long long res=1;
	while(b){
		if(b%2==1)res=res*a%p;
		a=a*a%p;
		b/=2;
	}
	return res;
}
long long binchaji[nm];
long long search(long long n){
	if(binchaji[n]==n)return binchaji[n];
	binchaji[n]=search(binchaji[n]);
	return binchaji[n];
}
long long  ans,bj[nm];
long long N,ni;
void dfs(long long n,long long m){
	long long res=f[n];
	for(int i=hs[n];i;i=lx[i].next){
		if(lx[i].to!=m){
			dfs(lx[i].to,n);
			f[n]=f[n]+(f[lx[i].to]+bj[lx[i].to])%p*res%p*ni%p;
			bj[n]=bj[n]+(f[lx[i].to]+bj[lx[i].to])%p*ni%p;
			res=res+(f[lx[i].to]+bj[lx[i].to])%p*ni%p;
			res%=p;
			f[n]%=p;
			bj[n]%=p;
		}
	}
}
int main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	read(b);
	read(c);
	N=Pow(2,c);
	ni=Pow(2,p-2);
	for(int i=1;i<=c;i++){
		read(x);
		read(y);
		jiajia(x,y);
		jiajia(y,x);
	}
	tarjin(1,0);
	for(int i=1;i<=s;i++)binchaji[i]=i;
	for(int i=1;i<=b;i++){
		for(int j=g[i];j;j=a[j].next){
			if(co[i]!=co[a[j].to] and binchaji[search(co[i])]!=binchaji[search(co[a[j].to])]){
				jiajia2(co[i],co[a[j].to]);
				jiajia2(co[a[j].to],co[i]);
				binchaji[search(co[i])]=binchaji[search(co[a[j].to])];
	}
		}
	}
	for(int i=1;i<=s;i++){
	f[i]=Pow(2,num[i]);	
		f[i]=(f[i]-1+p)%p;
		bj[i]=0;
	}
	dfs(1,0);
	for(int i=1;i<=s;i++){
		ans=ans+f[i]*N%p;
		ans%=p;
	}
	ans=(ans%p+p)%p;
	printf("%lld",ans%p);
//for(int i=1;i<=s;i++)cout<<sss[i]<<" ";
}
//4 4
//1 2
//2 3
//3 1
//1 4




//12 15
//1 2
//1 3
//1 4
//2 3
//3 4
//4 9
//4 8
//8 10
//10 11
//11 12
//12 10
//3 5
//5 6
//6 7
//7 5