#include<bits/stdc++.h>
#define ll long long
using namespace std;
const int N=500005,M=2000005,P=1e9+7;
int n,m,a[N];
int head[N],nxt[M],ver[M],tot=1;
int dfn[N],low[N],scc[N],cnt,stk[N],top,idx;
vector<int> e[N];
ll f[N],ans,inv2,p[N];
int read() {
	int x=0,f=1; char c=getchar();
	for(;c<'0'||c>'9';c=getchar()) if(c=='-') f=-1;
	for(;c>='0'&&c<='9';c=getchar()) x=x*10+c-48;
	return x*f;
}
ll power(ll x,int y) {ll v=1; for(;y;y>>=1,x=x*x%P) if(y&1) v=v*x%P; return v;}
ll inv(ll x) {return power(x,P-2);}
void add(int x,int y) {
	nxt[++tot]=head[x]; head[x]=tot; ver[tot]=y;
}
void tarjan(int x,int from) {
	dfn[x]=low[x]=++idx; stk[++top]=x;
	for(int i=head[x];i;i=nxt[i]) {
		int y=ver[i];
		if(!dfn[y]) {
			tarjan(y,i);
			low[x]=min(low[x],low[y]);
		}
		else if(i^from^1) low[x]=min(low[x],dfn[y]);
	}
	if(low[x]==dfn[x]) {
		int y; cnt++;
		do {y=stk[top--]; scc[y]=cnt;} while(y!=x);
	}
}
void dfs(int x,int fa) {
	ll res=1;
	for(int y:e[x]) if(y!=fa) {
		dfs(y,x);
		res=res*(f[y]*inv2%P+1)%P;
//		res=res*f[y]%P*inv(2)%P;
	}
//	f[x]=((res-1+P)*power(2,a[x])+(power(2,a[x])-1+P))%P;
//	f[x]=res*power(2,a[x])%P;
	ans=(ans+res*(p[a[x]]-1+P))%P;
	f[x]=(res*(p[a[x]]-1+P)+res-1+P)%P;
}
int main() {
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	n=read(); m=read();
	for(int i=1;i<=m;i++) {
		int x=read(),y=read();
		add(x,y); add(y,x);
	}
	tarjan(1,0);
	for(int x=1;x<=n;x++) {
		a[scc[x]]++;
		for(int i=head[x];i;i=nxt[i]) {
			int y=ver[i];
			if(scc[x]!=scc[y]) {
				e[scc[x]].push_back(scc[y]);
			}
		}
	}
	p[0]=1; for(int i=1;i<=n;i++) p[i]=p[i-1]*2%P;
	inv2=inv(2); dfs(1,0);
	ans=ans*power(2,m)%P;
	printf("%lld\n",ans);
	return 0;
}
