#include <bits/stdc++.h>
using namespace std;
int add(int _a, int _b) {
  _a = (_a + 1000000007) % 1000000007;
  _b = (_b + 1000000007) % 1000000007;
  return (_a + _b) % 1000000007;
}
int mul(int _a, int _b) {
  _a = (_a + 1000000007) % 1000000007;
  _b = (_b + 1000000007) % 1000000007;
  return ((long long int)((long long int)_a * (long long int)_b)) % 1000000007;
}
int big_mod(int v, int p) {
  if (p == 0) {
    return 1;
  }
  int ret = big_mod(v, p / 2);
  if (p % 2 == 0) {
    return mul(ret, ret);
  }
  return mul(ret, mul(ret, v));
}
int n, m, pwr[2 * 5 * 100010], inv_pwr[2 * 5 * 100010];
vector<int> adj[5 * 100010];
bool vis[5 * 100010], is_art[5 * 100010];
int Time, low[5 * 100010], dis[5 * 100010], bcc_cnt;
vector<int> bcc[5 * 100010], art_vec[5 * 100010];
stack<int> S;
void pop_bcc(int s, int u) {
  is_art[s] = true;
  bcc[bcc_cnt].push_back(s);
  while (true) {
    bcc[bcc_cnt].push_back(S.top());
    if (S.top() == u) {
      S.pop();
      break;
    }
    S.pop();
  }
  bcc_cnt++;
  if (bcc[bcc_cnt - 1].size() <= 2) {
    bcc[bcc_cnt - 1].clear();
    bcc_cnt--;
  }
}
void find_bcc(int src, int par) {
  S.push(src);
  int i, u, child = 0;
  vis[src] = true, Time++, dis[src] = low[src] = Time;
  for (i = 0; i < adj[src].size(); i++) {
    u = adj[src][i];
    if (!vis[u]) {
      child++, find_bcc(u, src);
      low[src] = min(low[src], low[u]);
      if (par != -1 && low[u] >= dis[src]) {
        pop_bcc(src, u);
      } else if (par == -1) {
        if (child > 1) {
          pop_bcc(src, u);
        }
      }
    } else if (par != u) {
      low[src] = min(low[src], dis[u]);
    }
  }
  if (par == -1 && child > 1) {
    is_art[src] = true;
  }
}
void process_bcc() {
  int i, j;
  bool f;
  bcc_cnt = 0;
  for (i = 0; i < n; i++) {
    if (!vis[i]) {
      Time = 0;
      find_bcc(i, -1);
      f = false;
      while (!S.empty()) {
        f = true;
        bcc[bcc_cnt].push_back(S.top());
        S.pop();
      }
      if (f) {
        bcc_cnt++;
        if (bcc[bcc_cnt - 1].size() <= 2) {
          bcc[bcc_cnt - 1].clear();
          bcc_cnt--;
        }
      }
    }
  }
}
void input() {
  int i, j;
  scanf("%d %d", &n, &m);
  for (i = 0; i < m; i++) {
    int u, v;
    scanf("%d %d", &u, &v), u--, v--;
    adj[u].push_back(v), adj[v].push_back(u);
  }
}
inline int comb(int a) { return mul(a, a - 1); }
void solve() {
  int i, j, sol = 0, sz, baki = 0, sum = 0, sz1;
  process_bcc();
  int a = mul(n, inv_pwr[1]);
  int b = mul(m, inv_pwr[2]);
  int c = 0;
  for (i = 0; i < bcc_cnt; i++) {
    sz = bcc[i].size();
    c = add(c, inv_pwr[sz]);
  }
  int a_2 = mul(comb(n), inv_pwr[2]);
  a_2 = add(a_2, mul(n, inv_pwr[1]));
  int b_2 = 0;
  for (i = 0; i < n; i++) {
    sz = adj[i].size();
    b_2 = add(b_2, mul(comb(sz), inv_pwr[3]));
    b_2 = add(b_2, -mul(comb(sz), inv_pwr[4]));
  }
  b_2 = add(b_2, mul(comb(m), inv_pwr[4]));
  b_2 = add(b_2, mul(m, inv_pwr[2]));
  int c_2 = 0;
  for (i = 0; i < bcc_cnt; i++) {
    for (j = 0; j < bcc[i].size(); j++) {
      if (is_art[bcc[i][j]]) {
        art_vec[bcc[i][j]].push_back(i);
      }
    }
  }
  for (i = 0; i < n; i++) {
    for (j = 0, sum = 0; j < art_vec[i].size(); j++) {
      sz = bcc[art_vec[i][j]].size();
      sum = add(sum, inv_pwr[sz]);
    }
    for (j = 0; j < art_vec[i].size(); j++) {
      sz = bcc[art_vec[i][j]].size();
      c_2 = add(c_2, mul(add(sum, -inv_pwr[sz]), inv_pwr[sz - 1]));
      c_2 = add(c_2, -mul(add(sum, -inv_pwr[sz]), inv_pwr[sz]));
    }
  }
  for (i = 0, sum = 0; i < bcc_cnt; i++) {
    sz = bcc[i].size();
    sum = add(sum, inv_pwr[sz]);
  }
  for (i = 0; i < bcc_cnt; i++) {
    sz = bcc[i].size();
    c_2 = add(c_2, mul(add(sum, -inv_pwr[sz]), inv_pwr[sz]));
    c_2 = add(c_2, inv_pwr[sz]);
  }
  int ab = 0;
  ab = add(ab, mul(mul(2, m), inv_pwr[2]));
  ab = add(ab, mul(mul(m, n - 2), inv_pwr[3]));
  int bc = 0;
  for (i = 0; i < bcc_cnt; i++) {
    sz = bcc[i].size();
    bc = add(bc, mul(sz, inv_pwr[sz]));
    bc = add(bc, -mul(sz, inv_pwr[sz + 2]));
    bc = add(bc, mul(m, inv_pwr[sz + 2]));
    for (j = 0; j < bcc[i].size(); j++) {
      sz1 = adj[bcc[i][j]].size();
      sz1 = add(sz1, -2);
      bc = add(bc, mul(sz1, inv_pwr[sz + 1]));
      bc = add(bc, -mul(sz1, inv_pwr[sz + 2]));
    }
  }
  int ca = 0;
  for (i = 0; i < bcc_cnt; i++) {
    sz = bcc[i].size();
    ca = add(ca, mul(sz, inv_pwr[sz]));
    ca = add(ca, -mul(sz, inv_pwr[sz + 1]));
    ca = add(ca, mul(n, inv_pwr[sz + 1]));
  }
  int e_x = add(a, add(-b, c));
  sol = 0;
  sol = add(sol, -mul(e_x, e_x));
  sol = add(sol, add(a_2, add(b_2, c_2)));
  sol = add(sol, -mul(2, ab));
  sol = add(sol, -mul(2, bc));
  sol = add(sol, mul(2, ca));
  printf("%d", sol);
  puts("");
}
void pre_process() {
  int i, j, inv_2 = big_mod(2, 1000000007 - 2);
  for (i = 1, pwr[0] = 1, inv_pwr[0] = 1; i < 2 * 5 * 100010 - 2; i++) {
    pwr[i] = mul(pwr[i - 1], 2);
    inv_pwr[i] = mul(inv_pwr[i - 1], inv_2);
  }
}
int main() {
  pre_process();
  input();
  solve();
}
