#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e5 + 5;
const int mod = 1e9 + 7;
int Xi2[maxn], InSumCycle[maxn];
int path[maxn], path_id, v_cycle_id, cycle_sum_node;
signed n, m;
char vis[maxn];
vector<vector<int> *> v_cycle(maxn);
vector<vector<int> > pic(maxn);
inline int pow2(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res *= a, res %= mod;
    b >>= 1;
    a *= a;
    a %= mod;
  }
  return res;
}
inline void AddCycle(const int &e) {
  int i = 0;
  v_cycle[++v_cycle_id] = new vector<int>;
  vector<int> &tempV = *v_cycle[v_cycle_id];
  for (i = 1; i <= path_id; i++)
    if (path[i] == e) break;
  for (; i <= path_id; i++) tempV.push_back(path[i]);
  for (int ii = 0; ii < (int)tempV.size(); ii++) {
    const int &n = tempV[ii];
    InSumCycle[n] += Xi2[tempV.size()];
    InSumCycle[n] %= mod;
  }
  cycle_sum_node += Xi2[tempV.size()];
  cycle_sum_node %= mod;
}
void dfs(int ii, int ff) {
  vis[ii] = 1;
  path[++path_id] = ii;
  for (int i = 0; i < (int)pic[ii].size(); i++) {
    const int &e = pic[ii][i];
    if (e == ff) continue;
    if (vis[e] == 2) continue;
    if (vis[e] == 1) {
      AddCycle(e);
      continue;
    }
    dfs(e, ii);
  }
  vis[ii] = 2;
  path_id--;
}
inline int get_node() { return 1ll * Xi2[1] * n % mod; }
inline int get_edge() { return 1ll * Xi2[2] * m % mod; }
inline int get_cycle() {
  int res = 0;
  for (int i = 1; i <= v_cycle_id; i++) {
    vector<int> &tempV = *v_cycle[i];
    res += Xi2[tempV.size()] % mod;
    res %= mod;
  }
  return res;
}
inline int get_node2() {
  return (1ll * Xi2[1] * n % mod + Xi2[2] * (1ll * n * (n - 1) % mod) % mod) %
         mod;
}
inline int get_edge2() {
  int res = 0;
  for (int i = 1; i <= n; i++) {
    for (int ii = 0; ii < (int)pic[i].size(); ii++) {
      const int &e = pic[i][ii];
      if (e < i) continue;
      int siz = pic[i].size() + pic[e].size() - 2;
      res += Xi2[2];
      res %= mod;
      res += (long long)Xi2[3] * siz % mod;
      res %= mod;
      res += (long long)Xi2[4] * (m - siz - 1) % mod;
      res %= mod;
    }
  }
  return res;
}
inline int get_cycle2() {
  int res = 0;
  for (int ii = 1; ii <= v_cycle_id; ii++) {
    vector<int> &tempV = *v_cycle[ii];
    const int &siz = tempV.size();
    int LinkSumCycle = 0;
    res += Xi2[siz];
    res %= mod;
    for (int i = 0; i < siz; i++) {
      const int &n = tempV[i];
      const int &x = InSumCycle[n];
      LinkSumCycle += (((long long)x - Xi2[siz]) % mod + mod) % mod;
      LinkSumCycle %= mod;
    }
    res += 2ll * Xi2[siz] * LinkSumCycle % mod;
    res %= mod;
    res += 1ll * Xi2[siz] * (cycle_sum_node - LinkSumCycle - Xi2[siz]) % mod;
    res %= mod;
  }
  return ((long long)res + mod) % mod;
}
inline int get_NodeEdge() {
  return ((1ll * m * (n - 2) % mod) * Xi2[3] % mod + 2ll * m * Xi2[2] % mod) %
         mod;
}
inline int get_NodeCycle() {
  int res = 0;
  for (int ii = 1; ii <= v_cycle_id; ii++) {
    vector<int> &tempV = *v_cycle[ii];
    const int &siz = tempV.size();
    res += ((long long)Xi2[siz + 1] * (n - siz) % mod +
            (long long)Xi2[siz] * siz % mod) %
           mod;
    res %= mod;
  }
  return res;
}
inline int get_EdgeCycle() {
  int res = 0;
  for (int ii = 1; ii <= v_cycle_id; ii++) {
    vector<int> &tempV = *v_cycle[ii];
    const int &siz = tempV.size();
    int LinkSumEdge = 0;
    res += (long long)Xi2[siz] * siz % mod;
    res %= mod;
    for (int i = 0; i < siz; i++) {
      const int &e = tempV[i];
      const int &x = pic[e].size();
      res += (long long)(x - 2) * Xi2[siz + 1] % mod;
      res %= mod;
      LinkSumEdge += x - 2;
    }
    res += (long long)(m - siz - LinkSumEdge) * Xi2[siz + 2] % mod;
    res %= mod;
  }
  return res;
}
inline int getres1() {
  return ((long long)get_node2() + get_edge2() + get_cycle2() -
          2ll * get_NodeEdge() - 2ll * get_EdgeCycle() +
          2ll * get_NodeCycle()) %
         mod;
}
inline int getres2() {
  return ((long long)(get_node() - get_edge() + get_cycle()) % mod *
          (get_node() - get_edge() + get_cycle()) % mod) %
         mod;
}
signed main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    signed a, b;
    scanf("%d%d", &a, &b);
    pic[a].push_back(b);
    pic[b].push_back(a);
  }
  Xi2[0] = 1;
  Xi2[1] = pow2(2, mod - 2);
  int temp_n = max(10, n);
  for (int i = 2; i <= temp_n; i++)
    Xi2[i] = (long long)Xi2[i - 1] * Xi2[1] % mod;
  dfs(1, 0);
  const int R1 = getres1();
  const int R2 = getres2();
  int res = ((((long long)R1 - R2) % mod) + mod) % mod;
  printf("%d\n", (signed)res);
  return 0;
}
