#include<bits/stdc++.h>
const int mod=1'000'000'007;
struct graph
{
	int n,cnt,cc,low[500005],dfn[500005],b[500005];
	std::stack<int> st;
	std::vector<int> a[500005];
	void add(int x,int y){a[x].push_back(y);a[y].push_back(x);}
	void tarjan(int v,int fa)
	{
//		printf("Tarjan %d\n",v);
		st.push(v);
		low[v]=dfn[v]=++cnt;
		for (int i=0;i<(int)a[v].size();i++)
		{
			int u=a[v][i];
			if (u==fa) continue;
			if (!dfn[u]) tarjan(u,v),low[v]=std::min(low[v],low[u]);
			else low[v]=std::min(low[v],dfn[u]);
		}
		if (low[v]>dfn[fa])
		{
			int now=++cc;
			while (!st.empty())
			{
				int x=st.top();st.pop();
				b[x]=now;
				if (x==v) break;
			}
		}
	}
};
struct edge{int x,y;};
edge f[1000005];
long long dp[500005][5],s[500005],d[500005],w1[500005],w2[500005],sz[500005],pw[1000005],c[500005],ans=0;
std::vector<int> a[500005];
int n,m;
void add(int x,int y){a[x].push_back(y);a[y].push_back(x);}
void dfs(int v,int fa)
{
//	printf("dfs %d %d\n",v,fa);
	dp[v][0]=1,dp[v][1]=dp[v][2]=0;
	for (int i=0;i<(int)a[v].size();i++)
	{
		int u=a[v][i];
		if (u==fa) continue;
		dfs(u,v);
		dp[v][2]=(dp[v][2]*(d[u]*2+s[u])%mod+dp[v][1]*s[u])%mod;
		dp[v][1]=(dp[v][0]*s[u]+dp[v][1]*d[u]%mod*2)%mod;
		dp[v][0]=dp[v][0]*d[u]%mod*2%mod;
		sz[v]=sz[v]+1;
		sz[v]=sz[v]+sz[u];
	}
	long long s1=w1[v],s2=w2[v];
	//choose self
	s[v]=(s[v]+s1*(dp[v][0]+dp[v][1]+dp[v][2]))%mod;
	ans=(ans+s[v]*pw[m-sz[v]])%mod;
	//not choose
	s[v]=(s[v]+s2*dp[v][2])%mod;
	ans=(ans+s2*dp[v][2]%mod*pw[m-sz[v]])%mod;
	s[v]=(s[v]+s2*dp[v][1])%mod;
	d[v]=(d[v]+s2*dp[v][0])%mod;
//	printf("%d:%lld\n",v,ans);
}
graph g;
int main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	scanf("%d%d",&n,&m);
	pw[0]=1;
	for (int i=1;i<=std::max(n,m);i++) pw[i]=pw[i-1]*2%mod;
	for (int i=1;i<=m;i++) scanf("%d%d",&f[i].x,&f[i].y),g.add(f[i].x,f[i].y);
	g.n=n;
	g.tarjan(1,0);
	for (int i=1;i<=g.cnt;i++) c[i]=0,sz[i]=0;
//	for (int i=1;i<=n;i++) printf("%d ",g.b[i]);puts("");
	for (int i=1;i<=m;i++)
		if (g.b[f[i].x]!=g.b[f[i].y]) add(g.b[f[i].x],g.b[f[i].y]);
		else ++sz[g.b[f[i].x]];
	for (int i=1;i<=n;i++) ++c[g.b[i]];
	for (int i=1;i<=g.cnt;i++)
	{
		w1[i]=(pw[c[i]]-1+mod)%mod,w2[i]=1;
		w1[i]=w1[i]*pw[sz[i]]%mod,w2[i]=w2[i]*pw[sz[i]]%mod;
	}
	dfs(1,-1);
//	for (int i=1;i<=n;i++) printf("%d:%lld %lld %lld(%lld %lld)\n",i,dp[i][0],dp[i][1],dp[i][2],s[i],d[i]);
	printf("%lld\n",ans);
	return 0;
}