#include<bits/stdc++.h>
using namespace std;
const int Mod=1e9+7;
const int inv2=(Mod+1)/2;
using pii=pair<int,int>;
using ll=long long;
int n,m,low[510000],dfn[510000],dtime;
vector<pii> vec[510000]; bool mycut[1100000];
char Getchar(){
    static char now[1<<20],*S,*T;
    if (T==S){
        T=(S=now)+fread(now,1,1<<20,stdin);
        if (T==S) return EOF;
    }
    return *S++;
}
int read(){
    int x=0,f=1;
    char ch=Getchar();
    while (ch<'0'||ch>'9'){
        if (ch=='-') f=-1;
        ch=Getchar();
    }
    while (ch>='0'&&ch<='9') x=x*10+ch-'0',ch=Getchar();
    return x*f;
}
void tarjan(int u,int f){
    dfn[u]=low[u]=++dtime;
    for (pii t:vec[u]){
        int v=t.first,c=t.second;
        if (v==f) continue;
        if (!dfn[v]){
            tarjan(v,u);
            low[u]=min(low[u],low[v]);
            if (low[v]>dfn[u]) mycut[c]=true;
        } else low[u]=min(low[u],dfn[v]);
    }
}
int cnt,bel[510000],tot[510000];
void dfs(int u){
    if (bel[u]) return;
    bel[u]=cnt; tot[cnt]++;
    for (pii t:vec[u]){
        int v=t.first,c=t.second;
        if (mycut[c]) continue;
        dfs(v);
    }
}
ll pw2[1100000]; vector<int> vvv[510000];
int dp[510000]; bool vis2[510000];
vector<int> ttt[510000]; ll ans;
void dfs2(int u){
    vis2[u]=true;
    int val=1,sum=0;
    for (int v:vvv[u]){
        if (vis2[v]) continue;
        dfs2(v);
        val=val*(1ll*dp[v]*inv2%Mod+1)%Mod;
        sum=(sum+1ll*dp[v]*inv2)%Mod;
    }
    ans=(ans+val*(pw2[tot[u]]+Mod-1))%Mod;//top u
    ans=(ans+val+Mod-sum-1)%Mod;
    dp[u]=((val+Mod-1)*pw2[tot[u]]%Mod+(pw2[tot[u]]+Mod-1))%Mod;
}
int main(){
    freopen("barrack.in","r",stdin);
    freopen("barrack.out","w",stdout);
    n=read(); m=read();
    for (int i=1,u,v;i<=m;i++){
        u=read(); v=read();
        vec[u].emplace_back(v,i);
        vec[v].emplace_back(u,i);
    }
    // cerr<<"ok\n";
    pw2[0]=1;
    for (int i=1;i<=1000005;i++) pw2[i]=(pw2[i-1]<<1)%Mod;
    tarjan(1,0);
    for (int i=1;i<=n;i++)
        if (!bel[i]) cnt++,dfs(i);
    // cerr<<cnt<<'\n';
    for (int i=1;i<=n;i++)
        for (pii t:vec[i]){
            int v=t.first,c=t.second;
            if (mycut[c]) vvv[bel[i]].push_back(bel[v]);//cerr<<bel[i]<<' '<<bel[v]<<'\n'
        }
    dfs2(1);
    printf("%lld\n",1ll*ans*pw2[m]%Mod);
    return 0;
}
