#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int kcz=1000000007;
const int maxn=500005;
const int maxm=1000005;
#define top sdfkjahdjkf
int n,he[maxn],ne[maxm<<1],to[maxm<<1],tot,dfn[maxn],low[maxn];
int sc[maxn],he_[maxn],ne_[maxn],to_[maxn],cnt,sta[maxn],top,sz[maxn];
ll p2[maxn],ans,f[maxn][2];
inline void add_edge(int u,int v) { to[tot]=v,ne[tot]=he[u],he[u]=tot++; }
inline void add_edge_(int u,int v) { to_[tot]=v,ne_[tot]=he_[u],he_[u]=tot++; }
inline void dfs(int u,int pre)
{
    int i;
    dfn[u]=low[u]=tot++,sta[++top]=u;
    for(i=he[u];~i;i=ne[i])
        if(dfn[to[i]]==-1)
            dfs(to[i],i),low[u]=min(low[u],low[to[i]]);
        else if((i^pre)!=1) low[u]=min(low[u],dfn[to[i]]);
    if(dfn[u]==low[u])
    {
        do sc[sta[top]]=cnt; while(sta[top--]!=u);
        cnt++;
    }
}
#define add(x,y) (((x+=y)>=kcz)?x-=kcz:0)
// bool vis[maxn];
int main()
{
    int i,m,u,v;
    ll t;
    freopen("barrack.in","r",stdin),freopen("barrack.out","w",stdout);
    scanf("%d%d",&n,&m);
    for(i=1,tot=0,p2[0]=1;i<=n;i++) 
        dfn[i]=he[i]=-1,(((p2[i]=p2[i-1]<<1)>=kcz)?p2[i]-=kcz:0);
    while(m--) scanf("%d%d",&u,&v),add_edge(u,v),add_edge(v,u);
    tot=0,cnt=0,top=-1,dfs(1,-1);
    // fprintf(stderr,"%d\n",cnt);
    // for(i=1;i<=n;i++) printf("%d ",sc[i]); printf("\n");
    for(tot=0,i=0;i<cnt;i++) he_[i]=-1;
    for(i=0;i<cnt;i++) f[i][0]=1,f[i][1]=0;
    for(i=1;i<=n;i++) ((f[sc[i]][1]=(f[sc[i]][1]<<1)|1)>=kcz)?f[sc[i]][1]-=kcz:0;
    for(u=1;u<=n;u++)
        for(i=he[u];~i;i=ne[i])
            if(sc[to[i]]<sc[u])
                add_edge_(sc[u],sc[to[i]]);
    ans=0;
    for(u=0;u<cnt;u++)
    {
        // f[u][0]=f[u][1]=1;
        sz[u]=1;
        // for(i=he_[u];~i;i=ne_[i])
        //     assert(!vis[to_[i]]),vis[to_[i]]=1;
        for(i=he_[u];~i;i=ne_[i])
            // printf("%d-%d\n",u,to_[i]),
            f[u][1]=(f[u][0]*f[to_[i]][1]%kcz+f[u][1]*2ll*f[to_[i]][0]%kcz+f[u][1]*f[to_[i]][1]%kcz)%kcz,
            (f[u][0]*=2ll*f[to_[i]][0])%=kcz,
            sz[u]+=sz[to_[i]];
        // assert(f[u][0]==p2[sz[u]-1]);
        // add(ans,f[u][1]);
        // for(i=he_[u];~i;i=ne_[i])
        //     ((ans-=f[to_[i]][1])<0)?ans+=kcz:0;
        t=f[u][1];
        for(i=he_[u];~i;i=ne_[i])
            // ((t-=f[to_[i]][1])<0)?t+=kcz:0;
            // (t+=(kcz-f[to_[i]][1])*2ll)%=kcz;
            (t+=(kcz-f[to_[i]][1])*p2[sz[u]-sz[to_[i]]-1])%=kcz;
        (ans+=p2[cnt-sz[u]]*t)%=kcz;
        // printf("%lld %lld %lld\n",f[u][0],f[u][1],p2[cnt-sz[u]]*t%kcz);
    }
    // ans=f[cnt-1][1];
    // t=0;
    for(u=1;u<=n;u++)
        for(i=he[u];~i;i=ne[i])
            if(sc[to[i]]==sc[u] && (i&1))
                ((ans<<=1)>=kcz)?ans-=kcz:0; // t++;
    printf("%lld\n",ans);
    // fprintf(stderr,"%lld\n",t);
    fclose(stdin),fclose(stdout);
    return 0;
}