#include<bits/stdc++.h>
#define ll long long
#define int long long
#define pb push_back
#define Fin(x) freopen(x, "r", stdin)
#define Fout(x) freopen(x, "w", stdout)
#define Fio(x) Fin(x".in"), Fout(x".out")
using namespace std;
const int maxn = 5e5 + 10, maxm = 2e6 + 10, mod = 1e9 + 7;
int n, m, dfn[maxn], low[maxn], cnt, bel[maxn], tot, sz[maxn];
vector<int> edge[maxn], e[maxn];
stack<int> st;
int pw[maxm];
ll ans;
//int f[maxn], g[maxn];
void tarjan(int u, int f){
	dfn[u] = low[u] = ++cnt, st.push(u);
	for(int v : edge[u]) if(!dfn[v]){
		tarjan(v, u), low[u] = min(low[u], low[v]);
	}else if(v != f) low[u] = min(low[u], dfn[v]);
	if(low[u] == dfn[u]){
		int v; tot++; do{
			v = st.top(), st.pop(), bel[v] = tot;
		}while(v != u);
	}
}
//void dfs(int u, int fa){
//	f[u] = 1, g[u] = sz[u];
//	for(int v : edge[u]) if(v != fa){
//		dfs(v, u);
//		g[u] = g[u] * g[v] % mod, f[u] = f[u] * f[v] % mod;
//	}
//}
int ban[maxn], dep[maxn], f[maxn];
vector<int> vec;
void check(){
	if(vec.empty()) return;
	for(int i = 1; i <= tot; i++) ban[i] = 0;
	for(int i = 0; i < (int)vec.size(); i++) for(int j = i + 1; j < (int)vec.size(); j++){
		int u = vec[i], v = vec[j];
		if(bel[u] == bel[v]) continue;
		u = bel[u], v = bel[v];
		if(dep[u] < dep[v]) swap(u, v);
		while(dep[u] > dep[v]) ban[u] = 1, u = f[u];
		if(u == v) continue;
		while(u != v) ban[u] = ban[v] = 1, u = f[u], v = f[v];
	}
//	for(int i : vec) printf("%lld ", i);
	int x = m;
	for(int i = 1; i <= tot; i++) x -= ban[i];
//	printf(": %lld\n", x);
	ans = (ans + pw[x]) % mod;
}
void solve(int x){
	if(x > n) return check();
	solve(x + 1);
	vec.pb(x);
	solve(x + 1);
	vec.pop_back();
}
void dfs(int u, int fa){
	dep[u] = dep[fa] + 1, f[u] = fa;
	for(int v : e[u]) if(v != fa) dfs(v, u);
}
signed main(){
	Fio("barrack");
	scanf("%lld%lld", &n, &m), pw[0] = 1;
	for(int i = 1; i < maxm; i++) pw[i] = pw[i - 1] * 2ll % mod;
	for(int i = 1, x, y; i <= m; i++){
		scanf("%lld%lld", &x, &y);
		edge[x].pb(y), edge[y].pb(x);
	}
	tarjan(1, 0);
	for(int i = 1; i <= n; i++) for(int j : edge[i]) if(bel[i] != bel[j]) e[bel[i]].pb(bel[j]); else sz[bel[i]]++;
//	for(int i = 1; i <= tot; i++) sz[i] >>= 1;
//	for(int i = 1; i <= n; i++) sz[bel[i]]++;
//	for(int i = 1; i <= tot; i++) sz[i] = pw[sz[i]];
//	dfs(1, 0);
//	printf("%lld\n", (f[1] + g[1] - pw[m] + mod) % mod);
	dfs(1, 0);
	solve(1);
	printf("%lld\n", ans);
	return 0;
}

