#include <bits/stdc++.h>
using namespace std;
template <typename Tp>
void CMax(Tp &x, Tp y) {
  if (x < y) x = y;
}
template <typename Tp>
void CMin(Tp &x, Tp y) {
  if (y < x) x = y;
}
template <typename Tp>
void read(Tp &x) {
  x = 0;
  int op = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') op = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = (x << 1) + (x << 3) + c - '0';
    c = getchar();
  }
  x *= op;
}
const int MN = 500000 + 10;
const int Mod = 1e9 + 7;
int Pls(int x, int y) {
  x += y;
  if (x >= Mod) x -= Mod;
  return x;
}
void Plus(int &x, int y) {
  x += y;
  if (x >= Mod) x -= Mod;
}
int Sub(int x, int y) {
  x -= y;
  if (x < 0) x += Mod;
  return x;
}
int power(int x, int p) {
  int ret = 1;
  while (p) {
    if (p & 1) ret = 1ll * ret * x % Mod;
    x = 1ll * x * x % Mod;
    p >>= 1;
  }
  return ret;
}
int Inv(int x) { return power(x, Mod - 2); }
int inv2[MN];
void Process(int N) {
  inv2[N] = Inv(power(2, N));
  for (int i = N - 1; i >= 0; --i) inv2[i] = Pls(inv2[i + 1], inv2[i + 1]);
}
int N, M;
pair<int, int> edge[MN];
vector<int> G[MN];
void Adde(int x, int y) {
  G[x].push_back(y);
  G[y].push_back(x);
}
int cnt, sum;
vector<int> bel[MN], cir[MN];
int val[MN];
int inc[MN];
map<int, int> mp[MN];
int fa[MN], dep[MN];
void DFS(int x) {
  dep[x] = dep[fa[x]] + 1;
  for (int y : G[x])
    if (y != fa[x]) {
      if (!dep[y]) {
        fa[y] = x;
        DFS(y);
      } else if (dep[y] < dep[x]) {
        cnt++;
        inc[mp[x][y]] = cnt;
        for (int z = x; z != fa[y]; z = fa[z]) {
          bel[z].push_back(cnt), cir[cnt].push_back(z);
          if (z != y) inc[mp[z][fa[z]]] = cnt;
        }
        int v = inv2[((int)(cir[cnt]).size())];
        for (int z = x; z != fa[y]; z = fa[z]) Plus(val[z], v);
        sum = Pls(sum, v);
      }
    }
}
int V() { return 1ll * N * inv2[1] % Mod; }
int E() { return 1ll * M * inv2[2] % Mod; }
int C() { return sum; }
int VV() { return Pls(V(), 1ll * N * (N - 1) % Mod * inv2[2] % Mod); }
int EE() {
  int ret = 0;
  for (int i = (1); i <= (M); ++i) {
    int s1 = ((int)(G[edge[i].first]).size()) - 1,
        s2 = ((int)(G[edge[i].second]).size()) - 1;
    ret = Pls(ret, 1ll * (s1 + s2) * inv2[3] % Mod);
    ret = Pls(ret, 1ll * (M - s1 - s2 - 1) * inv2[4] % Mod);
  }
  return Pls(ret, E());
}
int CC() {
  int ret = 0;
  for (int i = (1); i <= (cnt); ++i) {
    int s = Sub(sum, inv2[((int)(cir[i]).size())]);
    for (int j : cir[i])
      if (((int)(bel[j]).size()) > 1) {
        int v = Sub(val[j], inv2[((int)(cir[i]).size())]);
        s = Sub(s, v);
        ret = Pls(ret, 1ll * v * inv2[((int)(cir[i]).size()) - 1] % Mod);
      }
    ret = Pls(ret, 1ll * s * inv2[((int)(cir[i]).size())] % Mod);
  }
  return Pls(ret, C());
}
int VE() {
  int ret = 0;
  for (int i = (1); i <= (N); ++i) {
    ret = Pls(ret, 1ll * ((int)(G[i]).size()) * inv2[2] % Mod);
    ret = Pls(ret, 1ll * (M - ((int)(G[i]).size())) * inv2[3] % Mod);
  }
  return ret;
}
int VC() {
  int ret = 0;
  for (int i = (1); i <= (N); ++i) {
    int s = sum;
    for (int j : bel[i]) {
      int v = inv2[((int)(cir[j]).size())];
      ret = Pls(ret, v);
      s = Sub(s, v);
    }
    ret = Pls(ret, 1ll * s * inv2[1] % Mod);
  }
  return ret;
}
int EC() {
  int ret = 0;
  for (int i = 1; i <= M; ++i) {
    if (inc[i]) {
      int j = inc[i];
      ret = Pls(ret, inv2[((int)(cir[j]).size())]);
      int s = Pls(val[edge[i].first], val[edge[i].second]);
      s = Sub(s, 2ll * inv2[((int)(cir[j]).size())] % Mod);
      ret = Pls(ret, 1ll * s * inv2[1] % Mod);
      int s2 = Sub(sum, s);
      s2 = Sub(s2, inv2[((int)(cir[j]).size())]);
      ret = Pls(ret, 1ll * s2 * inv2[2] % Mod);
    } else {
      int s = Pls(val[edge[i].first], val[edge[i].second]);
      ret = Pls(ret, 1ll * s * inv2[1] % Mod);
      int s2 = Sub(sum, s);
      ret = Pls(ret, 1ll * s2 * inv2[2] % Mod);
    }
  }
  return ret;
}
int main() {
  read(N);
  read(M);
  Process(N + 2);
  for (int i = (1); i <= (M); ++i) {
    int u, v;
    read(u);
    read(v);
    Adde(u, v);
    edge[i] = make_pair(u, v);
    mp[u][v] = mp[v][u] = i;
  }
  DFS(1);
  int ans1 = Pls(Sub(V(), E()), C());
  int ans2 = 0;
  Plus(ans2, VC());
  ans2 = Sub(ans2, VE());
  ans2 = Sub(ans2, EC());
  ans2 = Pls(ans2, ans2);
  ans2 = Pls(ans2, VV());
  ans2 = Pls(ans2, EE());
  ans2 = Pls(ans2, CC());
  printf("%d", Sub(ans2, 1ll * ans1 * ans1 % Mod));
  return 0;
}
