#include<iostream>
#include<algorithm>
#include<stdio.h>
#include<vector>
#include<set>
#include<numeric>
using namespace std;
const int _=5e6+50;
vector<int>e[_];
set<int>tmpe[_];
int n,m,f0[_],ff[_],dfn[_],nodew[_],cu,cv,ti,cn;
namespace tarjan{
int fi(int o){
    if(ff[o]==o) return o;
    else return ff[o]=fi(ff[o]);
}
void mmer(int o,int anc){
    anc=fi(anc);
    while(o^anc){
        if(fi(o)==o) ff[o]=fi(f0[o]);
        else o=fi(o);
    }
}
void dfs(int o,int fr){
    f0[o]=fr,dfn[o]=++ti;
    for(int&to:e[o])if(to^fr){
        if(dfn[to]) mmer(o,to);
        else dfs(to,o);
    }
}
void sbtarjan(){
    iota(ff+1,ff+n+1,1),dfs(1,1);
    for(int i=1;i<=n;i++){
        for(int to:e[i])
            tmpe[fi(i)].insert(fi(to));
    }
    int sume=0;
    for(int i=1;i<=n;i++){
        e[i].clear(),nodew[fi(i)]++;
        if(fi(i)==i) ++cn;
        for(int to:tmpe[i])if(to^i)
            e[i].push_back(to),++sume;
    }
}
}
const long long p=1e9+7;
struct fint{
    int v;
    fint(long long V=0){v=V%p;}
};
#define OP operator
fint OP+ (fint U,fint V){return (1ll*U.v+V.v);}
fint OP- (fint U,fint V){return ((1ll*U.v-V.v)%p+p);}
fint OP* (fint U,fint V){return 1ll*U.v*V.v;}
fint OP+=(fint&U,fint V){return U=U+V;}
fint OP*=(fint&U,fint V){return U=U*V;}
fint dp[_],qp2[_],em[_]; int w[_];
fint qpow2(int kk){
    if(kk<n) return qp2[kk];
    else {
        fint res=qpow2(kk>>1);
        if(kk&1) return res*res*2;
        else return res*res;
    }
}
fint res=0;
void fun(int o=1,int fr=1){
    fint prod=qp2[nodew[o]]; w[o]=1,dp[o]=0,em[o]=1;
    for(int to:e[o])if(to^fr){
        fun(to,o),w[o]+=w[to],prod*=dp[to]+qp2[w[to]-1],em[o]*=(em[to]+1);
    }
    dp[o]=prod;
    res+=(dp[o]-em[o])*qpow2(cn-w[o]-(o!=1));
}
signed main(){
    freopen("barrack.in","r",stdin);
    freopen("barrack.out","w",stdout);
    ios::sync_with_stdio(0),cin.tie(0);
    cin>>n>>m,qp2[0]=1;
    for(int i=1;i<=n;i++)
        qp2[i]=qp2[i-1]*2;
    for(int i=1;i<=m;i++)
        cin>>cu>>cv,e[cu].push_back(cv),e[cv].push_back(cu);
    tarjan::sbtarjan(),fun(),cout<<(res*qpow2(m-cn+1)).v<<endl;
}