#include <bits/stdc++.h>

constexpr int P = 1000000007;

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

constexpr int inv(int a) { return qpow(a, P - 2); }

constexpr int inv2 = inv(2);

class graph {
  int n;
  std::vector<std::vector<int>> E;
  int idx;
  std::vector<int> dfn, low;
  std::vector<int> sta;
  int cnt;
  std::vector<int> col;

  void tarjan(int u, int fa) {
    dfn[u] = low[u] = idx++;
    sta.push_back(u);
    for (int v : E[u]) {
      if (v != fa) {
        if (dfn[v] == -1) {
          tarjan(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 x = u;
      do {
        x = sta.back();
        sta.pop_back();
        col[x] = cnt;
      } while (x != u);
      ++cnt;
    }
  }

  std::vector<int> size;
  std::vector<std::vector<int>> G;
  std::vector<int> f;
  int ans;

  void dfs(int u, int fa) {
    int s = 0;
    for (int v : G[u]) {
      if (v != fa) {
        dfs(v, u);
        s = (1ll * s * (f[v] + 1) + 1ll * f[u] * f[v]) % P;
        f[u] = (1ll * f[u] * (f[v] + 1) + f[v]) % P;
      }
    }
    int tmp = 1ll * (f[u] + 1) * (qpow(2, size[u]) - 1) % P;
    f[u] = (f[u] + tmp) % P;
    s = (s + tmp) % P;
    f[u] = 1ll * f[u] * inv2 % P;
    ans = (ans + s) % P;
  }

 public:
  graph(int n) : n(n), E(n) {}

  void add_edge(int u, int v) {
    E[u].push_back(v);
    E[v].push_back(u);
  }

  int solve() {
    idx = 0;
    dfn.assign(n, -1);
    low.assign(n, -1);
    sta.clear();
    cnt = 0;
    col.assign(n, -1);
    tarjan(0, -1);
    size.assign(cnt, 0);
    G.assign(cnt, std::vector<int>());
    for (int u = 0; u < n; ++u) {
      ++size[col[u]];
      for (int v : E[u]) {
        if (col[u] != col[v]) {
          G[col[u]].push_back(col[v]);
        }
      }
    }
    f.assign(n, 0);
    ans = 0;
    dfs(0, -1);
    return ans;
  }
};

int main() {
  std::ifstream fin("barrack.in");
  std::ofstream fout("barrack.out");

  int n, m;
  fin >> n >> m;
  graph G(n);
  for (int i = 0; i < m; ++i) {
    int u, v;
    fin >> u >> v;
    --u, --v;
    G.add_edge(u, v);
  }
  fout << 1ll * G.solve() * qpow(2, m) % P << "\n";
}
