#include <bits/stdc++.h>
#define int long long

using namespace std;

int read() {
	int x=0, f=0; char c=getchar();
	while (!isdigit(c)) f|=c=='-', c=getchar();
	while (isdigit(c)) x=(x<<3)+(x<<1)+(c^48), c=getchar();
	return f ? -x : x;
}

const int N=5e5+10, M=2e6+10, P=1e9+7, I2=(P+1)/2;
int n, m, num, tot=1, qwq, ver[M], head[N], nxt[M], dfn[N], low[N], ge[M], col[N], cnt[N], f[N], ans, ss;
vector<int> e[N];

int power(int x, int y) {
	int r=1;
	while (y) {
		if (y&1) r=r*x%P;
		x=x*x%P; y>>=1;
	}
	return r;
}

void add(int x, int y) {
	ver[++tot]=y;
	nxt[tot]=head[x];
	head[x]=tot;
}

void tarjan(int x, int id) {
	dfn[x]=low[x]=++num;
	for (int i=head[x]; i; i=nxt[i]) {
		int y=ver[i];
		if (!dfn[y]) {
			tarjan(y, i);
			if (low[y]>dfn[x]) ge[i]=ge[i^1]=1;
			low[x]=min(low[x], low[y]);
		}
		else if (i!=(id^1)) low[x]=min(low[x], dfn[y]);
	}
}

void dfs1(int x) {	
	col[x]=qwq, cnt[qwq]++;
	for (int i=head[x]; i; i=nxt[i]) {
		if (ge[i]) continue;
		int y=ver[i];
		if (!col[y]) dfs1(y);
	}
}

void dfs(int x, int fa) {
	if (x!=1 && e[x].size()==1) {
		f[x]=(power(2, cnt[x])-1)%P;
		ans=(ans+ss*f[x])%P;
		return;
	}
	int t1=1;
	ans=(ans+ss*(power(2, cnt[x])-1))%P;
	for (int y:e[x]) {
		if (y==fa) continue;
		dfs(y, x);
		t1=t1*(f[y]*I2%P+1)%P;
		ans=(ans-f[y]*I2%P*ss%P+P)%P;
	}
	t1=(t1-1+P)%P;
	f[x]=(t1*(power(2, cnt[x]))+power(2, cnt[x])-1)%P;
	ans=(ans+t1*ss%P+ss*t1%P*(power(2, cnt[x])-1)%P)%P;
}

signed 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 i=1; i<=n; i++) if (!col[i]) ++qwq, dfs1(i);
	for (int x=1; x<=n; x++)
		for (int i=head[x]; i; i=nxt[i])
			if (ge[i]) e[col[x]].push_back(col[ver[i]]);
	ss=power(2, m);
	dfs(1, 0);
	printf("%lld\n", (ans+P)%P);
	return 0;
}