#include <bits/stdc++.h>
#define sz(a) int((a).size())
#define FOR(i, l, r) for(int i = (l); i <= (r); i++)
#define ROF(i, r, l) for(int i = (r); i >= (l); i--)
#define ll long long
#define vi vector<int>
using namespace std;
const int N = 1e6 + 10, P = 1e9 + 7, inv2 = (P + 1) / 2;
int n, m, p2[N];
int dfn[N], low[N], dfncnt = 0, stk[N], top = 0, siz[N], bel[N], gt = 0;
vi g[N], e[N];
int dp[N], fa[N];
void tarjan(int u, int fa) {
    dfn[u] = low[u] = ++dfncnt;
    stk[++top] = u;
    for(auto v : g[u]) if(v != fa) {
        if(!dfn[v]) {
            tarjan(v, u);
            low[u] = min(low[u], low[v]);
        } else low[u] = min(low[u], dfn[v]);
    }
    if(dfn[u] == low[u]) {
        gt++;
        for(int x = -1; x != u; ) {
            x = stk[top--];
            bel[x] = gt;
            siz[gt]++;
        }
    }
}
void init2(int n) {
    p2[0] = 1;
    FOR(i, 1, n) p2[i] = (ll)p2[i - 1] * 2 % P;
}
void dfs(int u, int fa) {
    ::fa[u] = fa;
    dp[u] = 1;
    for(auto v : e[u]) if(v != fa) {
        dfs(v, u);
        int res = ((ll)dp[v] * inv2 % P + 1) % P;
        dp[u] = (ll)dp[u] * res % P;
    }
    (dp[u] += P - 1) % P;
    dp[u] = (ll)dp[u] * p2[siz[u]] % P;
    (dp[u] += (p2[siz[u]] + P - 1) % P) %= P;
}
int main() {
    freopen("barrack.in", "r", stdin);
    freopen("barrack.out", "w", stdout);
    ios :: sync_with_stdio(0), cin.tie(0), cout.tie(0);
    init2(N - 10);
    cin >> n >> m;
    FOR(i, 1, m) {
        int u, v;
        cin >> u >> v;
        g[u].emplace_back(v), g[v].emplace_back(u);
    }
    tarjan(1, 0);
    FOR(u, 1, n) {
        for(auto v : g[u]) if(bel[u] != bel[v]) {
            e[bel[u]].emplace_back(bel[v]);
        }
    }
    dfs(1, 0);
    int ans = 0;
    FOR(u, 1, gt) {
        int res = dp[u];
        for(auto v : e[u]) if(v != fa[u]) {
            (res += P - (ll)dp[v] * inv2 % P) %= P;
        }
        (ans += (ll)res) %= P;
    }
    ans = (ll)ans * p2[m] % P;
    cout << ans << "\n";
}
