#include<bits/stdc++.h>
#define int long long
#define rd(x) x=read()
using namespace std;
const int mod=1e9+7;
const int N=(1<<16)+5;
const int M=305;
int ksm(int x,int y)
{
    int ans=1;
    while (y)
    {
        if (y%2==1) ans=ans*x%mod;
        y/=2;x=x*x%mod;
    }
    return ans;
}
int read()
{
    int x=0,f=1;char c=getchar();
    while (c>'9' || c<'0') {if (c=='-') f=-1;c=getchar();}
    while ('0'<=c && c<='9') {x=x*10+c-'0';c=getchar();}
    return x*f;
}
int n,m;
int u[N],v[N];
int ans[N];
int fa[N];
int getfa(int x)
{
    if (x==fa[x]) return x;return fa[x]=getfa(fa[x]);
}
void bruteforce()
{
    for (int i=1;i<(1<<n);i++) ans[i]=1;
    for (int j=1;j<=m;j++)
    {
        for (int i=1;i<=n;i++) fa[i]=i;
        //if no edge[j]
        for (int i=1;i<=m;i++) if (i!=j)
        {
            int x=getfa(u[i]);
            int y=getfa(v[i]);
            if (x!=y) fa[x]=y;
        }
        //for (int i=1;i<=n;i++) fa[i]=getfa(i);
        for (int S=1;S<(1LL<<n);S++)
        {
            int flag=2;
            int rt=0;
            for (int i=1;i<=n;i++) if ((S>>(i-1))&1)
            {
                if (rt==0) rt=getfa(i);
                if (getfa(i)!=rt) flag=1;
            }
            ans[S]=ans[S]*flag%mod;
        }
    }
    int res=0;
    for (int S=1;S<(1<<n);S++) res=(res+ans[S])%mod;
    cout<<res<<"\n";
}
void solve()
{
    if (n<=16 && m<=25)
    {
        bruteforce();
    } else 
    {
        int res=0;
        res=n*ksm(2,m)%mod;
        for (int i=2;i<=n;i++)
        {
            //len=i n-i+1 tiao
            res=(res+((n-i+1)*ksm(2,n-2)))%mod;
        }
        cout<<res<<"\n";
    }
}
signed main()
{
    srand(time(NULL));
    freopen("barrack.in","r",stdin);
    freopen("barrack.out","w",stdout);
    rd(n);rd(m);
    for (int i=1;i<=m;i++) rd(u[i]),rd(v[i]);
    solve();
    fclose(stdin);
    fclose(stdout);
    return 0;
}
//