#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
typedef long long ll;
inline int fastpow(int a, int n)
{
	int ans = 1;
	while(n)
	{
		if(n & 1)
			ans = 1ll * ans * a % mod;
		a = 1ll * a * a % mod, n >>= 1;
	}
	return ans;
}
struct Edge
{
	int to, nxt;
	bool ban;
}e[2000010];
int head[500010], ecnt = 0;
inline void addedge(int from, int to)
{
	e[ecnt].to = to;
	e[ecnt].ban = false;
	e[ecnt].nxt = head[from];
	head[from] = ecnt++;
}
int dfn[500010], low[500010], time_cnt = 0;
inline void dfs(int u, int fa)
{
	dfn[u] = low[u] = ++time_cnt;
	for(int i = head[u]; i != -1; i = e[i].nxt)
	{
		if(i == (fa ^ 1))
			continue;
		int v = e[i].to;
		if(dfn[v])
			low[u] = min(low[u], dfn[v]);
		else
			dfs(v, i), low[u] = min(low[u], low[v]);
		if(low[v] > dfn[u])
			e[i].ban = e[i ^ 1].ban = true;
	}
}
int bcc[500010], bsz[500010], N = 0;
inline void dfs2(int u)
{
	bcc[u] = N;
	bsz[N]++;
	for(int i = head[u]; i != -1; i = e[i].nxt)
	{
		int v = e[i].to;
		if(e[i].ban || bcc[v])
			continue;
		dfs2(v);
	}
}
vector<int> g[500010];
int sz[500010], dp[500010][2]; // 0 >= 1
int p2[1000010];
inline void Init(int n)
{
	p2[0] = 1;
	for(int i = 1; i <= n; i++)
		p2[i] = p2[i - 1] * 2 % mod;
}
inline void Work(int u, int fa)
{
	sz[u] = 1;
	for(auto v: g[u])
	{
		if(v == fa)
			continue;
		Work(v, u);
		sz[u] += sz[v];
	}
	dp[u][0] = 0, dp[u][1] = 1;
	for(auto v: g[u])
	{
		if(v == fa)
			continue;
		dp[u][0] = (dp[u][0] + 1ll * (dp[v][0] - dp[v][1] + mod) * p2[sz[u] - sz[v]]) % mod;
		dp[u][0] = (dp[u][0] + 1ll * dp[v][1] * p2[sz[u] - 1 - sz[v]]) % mod;
		dp[u][1] = 1ll * dp[u][1] * (dp[v][1] + p2[sz[v]]) % mod;
	}
	dp[u][1] = 1ll * dp[u][1] * (bsz[u] + 1) % mod;
	dp[u][1] = (dp[u][1] - p2[sz[u] - 1] + mod) % mod;
	dp[u][0] = (dp[u][1] + dp[u][0]) % mod;
//	dp[u][0] = 
//	cout << u << ", " << dp[u][0] << ", " << dp[u][1] << endl;
}
int main()
{
	freopen("C.in", "r", stdin);
	freopen("C.out", "w", stdout);
	memset(head, -1, sizeof(head));
	int n, m;
	scanf("%d %d", &n, &m);
	Init(m);
	for(int i = 1; i <= m; i++)
	{
		int u, v;
		scanf("%d %d", &u, &v);
		addedge(u, v), addedge(v, u);
	}
	dfs(1, -1);
	for(int i = 1; i <= n; i++)
		if(!bcc[i])
		{
			N++;
			dfs2(i);
		}
	for(int i = 1; i <= n; i++)
		for(int j = head[i]; j != -1; j = e[j].nxt)
		{
			if(!e[j].ban)
				continue;
			e[j ^ 1].ban = false;
			int v = e[j].to;
			int x = bcc[i], y = bcc[v];
			g[x].push_back(y), g[y].push_back(x);
		}
	for(int i = 1; i <= N; i++)
		bsz[i] = (p2[bsz[i]] - 1 + mod) % mod;
	Work(1, 1);
	printf("%lld\n", 1ll * dp[1][0] * p2[m - N + 1] % mod);
	return 0;
}