#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<vector>
using namespace std;
const int N=1000010,mod=1000000007;
int n,m,nxt[N<<1],to[N<<1],head[N],cnt;
void add(int u,int v){nxt[++cnt]=head[u],to[cnt]=v;head[u]=cnt;}
int dfn[N],low[N],idx;
int ton[N],tp,scc[N],sc,w[N];
void dfs(int u,int p)
{
	dfn[u]=low[u]=++idx;
	ton[++tp]=u;
	for(int i=head[u];i;i=nxt[i])
	{
		int v=to[i];if(v==p) continue;
		if(!dfn[v]) dfs(v,u),low[u]=min(low[u],low[v]);
		else low[u]=min(low[u],dfn[v]);
	}
	if(dfn[u]==low[u])
	{
		++sc,w[sc]=1;
		for(int v=ton[tp--];v!=u;v=ton[tp--]) scc[v]=sc,w[sc]++;
		scc[u]=sc;
	}
}
vector<int>g[N];
int f[N][2],_2[N],siz[N],ans;
void dfs2(int u,int p)
{
	f[u][0]=1,f[u][1]=_2[w[u]]-1;
	siz[u]=1;
	for(int v:g[u]) if(v!=p)
	{
		dfs2(v,u);siz[u]+=siz[v];
		int u0=f[u][0],u1=f[u][1],v0=f[v][0],v1=f[v][1];
		f[u][0]=1ll*u0*v0%mod;
		f[u][1]=(1ll*u0*v1%mod+1ll*u1*v0%mod+1ll*u1*v1%mod)%mod;
	}
	f[u][0]=2ll*f[u][0]%mod;
	int res=0;
	res=(res+1ll*f[u][1]*_2[sc-siz[u]])%mod;
	for(int v:g[u]) if(v!=p) res=(res-1ll*f[v][1]*_2[sc-siz[v]-1]%mod+mod)%mod;
	ans=(ans+res)%mod;
}
int main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	scanf("%d%d",&n,&m);
	for(int i=1,u,v;i<=m;i++) scanf("%d%d",&u,&v),add(u,v),add(v,u);
	for(int i=_2[0]=1;i<=m;i++) _2[i]=_2[i-1]*2ll%mod;
	dfs(1,0);
	for(int u=1;u<=n;u++)
		for(int i=head[u];i;i=nxt[i]) if(scc[u]!=scc[to[i]]) g[scc[u]].push_back(scc[to[i]]);
	dfs2(1,0);
	ans=1ll*ans*_2[m-sc+1]%mod;
	printf("%d\n",ans);
	return 0;
}
