#include<bits/stdc++.h>
#define ll long long
#define rep(i, l, r) for (int i=l, _=r; i<=_; i++)
#define per(i, l, r) for (int i=l, _=r; i>=_; i--)
using namespace std;

inline ll read() {
    ll s=0, t=0; char ch=getchar();
    for (; ch<'0'||ch>'9'; ch=getchar()) if (ch=='-') t=1;
    for (; ch>='0'&&ch<='9'; ch=getchar()) s=s*10+ch-'0';
    return t?-s:s;
}
const int M=2e6+5, N=5e5+5, N2=3005, ljc=1e9+7;
int he2[M], ne2[M], ed2[M], tot2;
void add2(int x, int y) {ed2[++tot2]=y; ne2[tot2]=he2[x]; he2[x]=tot2;}
int he[M], ne[M], ed[M], tot;
void add(int x, int y) {ed[++tot]=y; ne[tot]=he[x]; he[x]=tot;}
int dfn[N], low[N], cnt, st[N], top, cp, in[N], a[N];
void tarjan(int rt, int fa) {
    low[rt]=dfn[rt]=++cnt; st[++top]=rt;
    for (int i=he2[rt]; i; i=ne2[i]) if (i!=(fa^1)) {
        if (!dfn[ed2[i]]) {
            tarjan(ed2[i], i);
            low[rt]=min(low[ed2[i]], low[rt]);
        }
        else low[rt]=min(dfn[ed2[i]], low[rt]);
    }
    if (low[rt]==dfn[rt]) {
        cp++;
        while (st[top]!=rt) in[st[top--]]=cp, a[cp]++;
        in[st[top--]]=cp, a[cp]++;
    }
}
int f[N2][N2], tmp[N2], sz[N];
inline int qpow(int x, int y) {
    int res=1;
    for (; y; y>>=1, x=(ll)x*x%ljc) if (y&1) res=(ll)res*x%ljc;
    return res;
}
void dfs(int rt, int fa) {
    sz[rt]=1; f[rt][1]=qpow(2, a[rt]);
    for (int i=he[rt]; i; i=ne[i]) if (ed[i]!=fa) {
        dfs(ed[i], rt);
        memset(tmp, 0, sizeof(tmp));
        rep(j, 0, sz[rt]) rep(k, 0, sz[ed[i]]) 
            tmp[j+k]=(tmp[j+k]+(ll)f[rt][j]*f[ed[i]][k])%ljc;
        sz[rt]+=sz[ed[i]];
        memcpy(f[rt], tmp, sizeof(f[rt]));
    }
    for (int i=he[rt]; i; i=ne[i]) if (ed[i]!=fa) {
        rep(j, 0, sz[ed[i]]+1)
			f[rt][j]=(f[rt][j]-f[ed[i]][j-1]+ljc)%ljc;
    }
}
int main() {
    freopen("barrack.in", "r", stdin);
    freopen("barrack.out", "w", stdout);
    int n=read(), m=read(), x, y;
    tot2=1;
    rep(i, 1, m) x=read(), y=read(), add2(x, y), add2(y, x);
    tarjan(1, 0);
    // rep(i, 1, n) printf("%d ", in[i]); puts("");
    rep(i, 1, n) for (int j=he2[i]; j; j=ne2[j])
        if (in[i]!=in[ed2[j]]) add(in[i], in[ed2[j]]);
        else if (i<ed2[j]) a[in[i]]++;
    dfs(1, 0);
    int ans=0;
    rep(i, 1, cp) rep(j, 1, sz[i]) {
        // printf("f[%d,%d]=%d\n", i, j, f[i][j]);
        ans=(ans+(ll)f[i][j]*qpow(2, cp-j))%ljc;
    }
    // cout<<sz[3];
    printf("%d\n", ans-(n-1));
}