#include <bits/stdc++.h>

const int MOD = 1000000007;
enum int_t : int {};

int_t operator+(int_t a, int_t b)
{
	int r = (int)a + (int)b;
	if (r >= MOD)
		r -= MOD;
	return int_t(r);
}

int_t operator-(int_t a, int_t b)
{
	int r = (int)a - (int)b;
	if (r < 0)
		r += MOD;
	return int_t(r);
}

int_t operator*(int_t a, int_t b)
{
	int64_t r = (int64_t)a * (int64_t)b;
	return (int_t)(r % MOD);
}

const int N = 1000005;

int_t pow_2[N];

std::vector<int> e[N];
int n, m;

std::stack<int> st;
int dfn_cur, dfn[N], low[N], bel[N], bel_cnt;
std::vector<int> et[N];

void dfs0(int u, int f)
{
	st.push(u);
	dfn[u] = low[u] = dfn_cur++;
	for (int v: e[u]) if (v != f)
	{
		if (dfn[v] == -1)
		{
			dfs0(v, u);
			low[u] = std::min(low[u], low[v]);
		}
		else
		{
			low[u] = std::min(low[u], dfn[v]);
		}
	}
	if (dfn[u] == low[u])
	{
		int cb = bel_cnt++;
		while (st.top() != u)
		{
			bel[st.top()] = cb;
			st.pop();
		}
		bel[st.top()] = cb;
		st.pop();
	}
}

int size[N];
int_t w0[N], w1[N];
int_t ans;

void dfs1(int u, int f)
{
	size[u] = 1;
	for (int v: et[u]) if (v != f)
	{
		dfs1(v, u);
		size[u] += size[v];
	}
}

void dfs2(int u, int f)
{
	for (int v: et[u]) if (v != f)
	{
		dfs2(v, u);
		w1[u] = w1[u] * (w0[v] + w0[v] + w1[v])
			    + w0[u] * w1[v];
		w0[u] = w0[u] * (w0[v] + w0[v]);
	}
	if (u == 0)
		ans = ans + w1[u];
	else
		ans = ans + w1[u] * pow_2[bel_cnt - size[u] - 1];
}

int main()
{
#ifndef CM_DEBUG
	freopen("barrack.in", "r", stdin);
	freopen("barrack.out", "w", stdout);
#endif

	pow_2[0] = (int_t)1;
	for (int i = 0; i + 1 < N; i++)
		pow_2[i + 1] = pow_2[i] + pow_2[i];

	scanf("%d%d", &n, &m);
	for (int i = 0; i < m; i++)
	{
		int u, v;
		scanf("%d%d", &u, &v);
		e[u].push_back(v);
		e[v].push_back(u);
	}

	memset(dfn, -1, sizeof(dfn));
	memset(low, -1, sizeof(low));
	dfs0(1, 1);
	for (int u = 1; u <= n; u++)
		for (int v: e[u])
			if (v > u && bel[u] != bel[v])
			{
				et[bel[u]].push_back(bel[v]);
				et[bel[v]].push_back(bel[u]);
			}

	for (int i = 0; i < bel_cnt; i++)
	{
		w0[i] = (int_t)1;
		w1[i] = (int_t)1;
	}
	for (int i = 1; i <= n; i++)
		w1[bel[i]] = w1[bel[i]] * (int_t)2;
	for (int i = 0; i < bel_cnt; i++)
		w1[i] = w1[i] - (int_t)1;

	dfs1(0, 0);
	dfs2(0, 0);
	ans = ans * pow_2[m - (bel_cnt - 1)];

	printf("%d\n", (int)ans);

	return 0;
}
