#include <bits/stdc++.h>
#define fi first
#define se second

using namespace std;
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
using vii = vector<pii>;

const int N = 1e6 + 5;
const ll P = 1e9 + 7;

ll qpow(ll a, ll b)
{
	ll res = 1;
	for (; b; b >>= 1, a = a * a % P)
		if (b & 1) res = res * a % P;
	return res;
}

int n, m;
vi e2[N];
vi e[N], son[N];

int c[N], s[N];
int col[N];
int sz[N];
bool vis[N];
bool cut[N];
int dep[N];

void dfs1(int u, int fa)
{
	vis[u] = 1;
	for (int v : e[u])
		if (!vis[v])
			son[u].push_back(v), 
			dep[v] = dep[u] + 1, dfs1(v, u);
		else if (v != fa && dep[v] < dep[u])
		{
//			printf("%d to %d\n", u, v);
			s[u]--, s[v]++;
		}
}

void pushs(int u)
{
	for (int v : son[u])
		pushs(v), s[u] += s[v];
}

void dfs2(int u)
{
	for (int v : son[u])
	{
		if (s[v]) col[v] = col[u];
		else col[v] = v;
		dfs2(v);
	}
}

int szv[N], sze[N];
ll f[N][2];
int sumv[N], sume[N];
ll ans;

ll pw2[N * 2];

void dfs3(int u, int fa)
{
	sumv[u] = szv[u];
	sume[u] = sze[u];
	f[u][0] = pw2[sze[u]];
	f[u][1] = pw2[szv[u] + sze[u]];
	int deg = 0;
	for (int v : e2[u])
		if (v != fa)
		{
			dfs3(v, u);
			sumv[u] += sumv[v];
			sume[u] += sume[v];
			sume[u]++;
			f[u][0] = f[u][0] * f[v][0] * 2 % P;
			f[u][1] = f[u][1] * (f[v][0] * 2 + f[v][1]) % P;
		}
	f[u][1] = (f[u][1] + P - f[u][0]) % P;
	ll tmp = f[u][1];
	for (int v : e2[u])
		if (v != fa)
			tmp = (tmp + (P - f[v][1]) * pw2[sume[u] - sume[v] - 1]) % P;
	ans = (ans + tmp * pw2[m - sume[u]]) % P;
//	printf("f[%d]=(%lld %lld)\n",u,f[u][0],f[u][1]);
//	printf("sume=%d\n", sume[u]);
}

int main()
{
	freopen("barrack.in", "r", stdin);
	freopen("barrack.out", "w", stdout);
	scanf("%d%d", &n, &m);
	pw2[0] = 1;
	for (int i = 1; i <= n + m; i++)
		pw2[i] = pw2[i - 1] * 2 % P;
	for (int i = 1; i <= m; i++)
	{
		int u, v;
		scanf("%d%d", &u, &v);
		e[u].push_back(v);
		e[v].push_back(u);
	}
	dep[1] = 1, dfs1(1, 0);
	//puts("dfs1");
	pushs(1);
//	puts("OK");
//	for (int i = 1; i <= n; i++)
//	{
//		printf("%d: ", i);
//		for (int j : son[i])
//			printf("%d ", j); puts("");
//	}
//	for (int i = 1; i <= n; i++)
//		printf("%d ", c[i]); puts("");
		
	col[1] = 1, dfs2(1);
//	for (int i = 1; i <= n; i++)
//		printf("%d ", s[i]); puts("");
	int ecnt=0;
	for (int i = 1; i <= n; i++)
	{
		szv[col[i]]++;
		for (int j : e[i]) if (i < j)
		{
			if (col[i] == col[j]) 
				sze[col[i]]++;
			else 
			{
				e2[col[i]].push_back(col[j]);
				e2[col[j]].push_back(col[i]);
			}
		}
	}
//	for (int i = 1; i <= n; i++)
//		printf("%d ", szv[i]); puts("");
//	for (int i = 1; i <= n; i++)
//		printf("%d ", sze[i]); puts("");
	dfs3(1, 0);
//	printf("e=%d\n", sume[1]);
	printf("%lld\n", ans);
}
/*
8 9
6 1
1 5
5 4
4 1
1 3
3 2
2 1
3 7
7 8
*/