#include <bits/stdc++.h>
using namespace std;
int n, m, low[500005], dfn[500005], tot, sk[500005], r;
struct hh {
  long long x, y, z;
  hh operator+(int t) {
    return (hh){x, (y + 1ll * t * x) % 1000000007,
                (z + 2ll * t * y + 1ll * x * t % 1000000007 * t) % 1000000007};
  }
  hh operator+(hh t) {
    return (hh){(x + t.x) % 1000000007, (y + t.y) % 1000000007,
                (z + t.z) % 1000000007};
  }
  hh operator*(hh t) {
    return (hh){1ll * x * t.x % 1000000007,
                (1ll * y * t.x + 1ll * x * t.y) % 1000000007,
                (1ll * z * t.x + 1ll * x * t.z + 2ll * y * t.y) % 1000000007};
  }
} dp[500005][2], f[500005][3][2];
vector<int> d[500005];
int ac[500005];
void dfs(int x) {
  low[x] = dfn[x] = ++tot;
  sk[++r] = x;
  dp[x][0] = (hh){1, 0, 0};
  dp[x][1] = (hh){1, 0, 0};
  for (int i = 0; i < (int)d[x].size(); ++i) {
    int v = d[x][i];
    if (dfn[v]) {
      low[x] = min(low[x], dfn[v]);
      continue;
    }
    dfs(v);
    low[x] = min(low[x], low[v]);
    if (low[v] >= dfn[x]) {
      int tot = 0;
      ac[++tot] = x;
      while (dfn[sk[r]] >= dfn[v]) ac[++tot] = sk[r--];
      for (int l1 = 1; l1 <= tot; ++l1)
        for (int l2 = 0; l2 < 3; ++l2)
          for (int l3 = 0; l3 < 2; ++l3) f[l1][l2][l3] = (hh){0, 0, 0};
      f[1][2][1] = dp[x][1];
      f[1][0][0] = dp[x][0];
      for (int l1 = 1; l1 < tot; ++l1)
        for (int l2 = 0; l2 < 3; ++l2)
          for (int l3 = 0; l3 < 2; ++l3) {
            for (int l4 = 0; l4 < 2; ++l4) {
              int t = l4;
              if (t && l2 == 2) t = 2;
              f[l1 + 1][t][l3] =
                  f[l1 + 1][t][l3] +
                  f[l1][l2][l3] * (dp[ac[l1 + 1]][l4] + (l2 == 1 && !l4));
            }
          }
      dp[x][0] = dp[x][1] = (hh){0, 0, 0};
      for (int l1 = 0; l1 < 3; ++l1)
        for (int l2 = 0; l2 < 2; ++l2)
          dp[x][l2] = (dp[x][l2] + (f[tot][l1][l2] + (l1 == 1 && !l2)));
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1, x, y; i <= m; ++i) {
    scanf("%d%d", &x, &y);
    d[x].push_back(y);
    d[y].push_back(x);
  }
  dfs(1);
  hh ans = dp[1][0] + (dp[1][1] + 1);
  int cs = 1;
  for (int i = 1; i <= n; ++i)
    cs = 1ll * cs * (1000000007 + 1) / 2 % 1000000007;
  ans.z = 1ll * ans.z * cs % 1000000007;
  ans.y = 1ll * ans.y * cs % 1000000007;
  printf("%lld\n", ((ans.z - 1ll * ans.y * ans.y) % 1000000007 + 1000000007) %
                       1000000007);
}
