#include <bits/stdc++.h>
int ll[1 + 500000 * 3], jj[1 + 500000 * 3];
int link(int l, int j) {
  static int _ = 1;
  ll[_] = l, jj[_] = j;
  return _++;
}
int ae[500000], dd[500000], cc[500000], pp[500000], ta[500000];
int ck[500000 / 3], cd[500000 / 3], c;
int pt[500000 * 2 + 1];
void init(int n) {
  int i, p;
  for (i = 0, p = 1; i <= n * 2; i++) {
    pt[i] = p;
    p = p * 2 % 1000000007;
  }
}
void dfs(int p, int i) {
  static int time;
  int l;
  pp[i] = p;
  ta[i] = ++time;
  for (l = ae[i]; l; l = ll[l]) {
    int j = jj[l];
    if (j != p) {
      if (ta[j] == 0)
        dfs(i, j);
      else if (ta[j] < ta[i]) {
        int k = 1, d = dd[j], h;
        cc[j] = link(cc[j], c);
        for (h = i; h != j; h = pp[h]) {
          k++, d += dd[h];
          cc[h] = link(cc[h], c);
        }
        ck[c] = k, cd[c] = d, c++;
      }
    }
  }
}
long long p_;
int q_;
void add(long long p1, int q1, long long p2, int q2) {
  if (q1 < q2) {
    p_ = (p1 % 1000000007 * pt[q2 - q1] + p2) % 1000000007;
    q_ = q2;
  } else {
    p_ = (p1 + p2 % 1000000007 * pt[q1 - q2]) % 1000000007;
    q_ = q1;
  }
}
long long power(int a, int k) {
  long long p;
  if (k == 0) return 1;
  p = power(a, k / 2);
  p = p * p % 1000000007;
  if (k % 2) p = p * a % 1000000007;
  return p;
}
int main() {
  int n, m, h, i, j;
  long long pa, pc, m2, ans;
  int qa, qc;
  scanf("%d%d", &n, &m);
  init(n);
  for (h = 0; h < m; h++) {
    scanf("%d%d", &i, &j), i--, j--;
    ae[i] = link(ae[i], j), dd[i]++;
    ae[j] = link(ae[j], i), dd[j]++;
  }
  dfs(-1, 0);
  add(n, 1, -m, 2), pa = p_, qa = q_;
  for (h = 0; h < c; h++) add(pa, qa, 1, ck[h]), pa = p_, qa = q_;
  pa = (long long)-pa * pa % 1000000007, qa *= 2;
  add(pa, qa, (long long)n * (n + 1), 2), pa = p_, qa = q_;
  add(pa, qa, m, 2), pa = p_, qa = q_;
  m2 = 0;
  for (i = 0; i < n; i++) m2 += (long long)dd[i] * (dd[i] - 1);
  add(pa, qa, m2, 3), pa = p_, qa = q_;
  add(pa, qa, (long long)m * m - m - m2, 4), pa = p_, qa = q_;
  pc = 0, qc = 0;
  for (h = 0; h < c; h++) add(pc, qc, 1, ck[h]), pc = p_, qc = q_;
  add(pa, qa, pc, qc), pa = p_, qa = q_;
  for (i = 0; i < n; i++) {
    long long pb;
    int qb, l;
    pb = 0, qb = 0;
    for (l = cc[i]; l; l = ll[l]) {
      int h = jj[l];
      add(pb, qb, 1, ck[h]), pb = p_, qb = q_;
    }
    for (l = cc[i]; l; l = ll[l]) {
      int h = jj[l];
      add(pb, qb, -1, ck[h]);
      add(pa, qa, p_, q_ + ck[h]), pa = p_, qa = q_;
    }
  }
  for (h = 0; h < c; h++) {
    add(pc, qc, -1, ck[h]);
    add(pa, qa, p_, q_ + ck[h]), pa = p_, qa = q_;
  }
  for (i = 0; i < n; i++) add(pa, qa, -(m + dd[i]), 2), pa = p_, qa = q_;
  for (h = 0; h < c; h++) add(pa, qa, n + ck[h], ck[h]), pa = p_, qa = q_;
  for (h = 0; h < c; h++)
    add(pa, qa, -(m + cd[h] + ck[h]), ck[h] + 1), pa = p_, qa = q_;
  ans = pa * power(500000004, qa) % 1000000007;
  if (ans < 0) ans += 1000000007;
  printf("%lld\n", ans);
  return 0;
}
