#include<algorithm>
#include<cstdio>
const int N = 500010,M = 1000010;
const long long Mod = 1000000007;
int ver[M*4],next[M*4],head[N*2],ecnt;
int dfn[N],low[N],st[N],dfncnt,top;
int colcnt,col[N];
long long dp[N][2],sz[N],edgecnt[N],pow2[M+N],extra,edgesum[N];
int n,m,u,v;
void add_edge(int u,int v)
{
	ver[++ecnt] = v,next[ecnt] = head[u],head[u] = ecnt;
}

int stacku[N],stackfa[N],stacki[N],stackv[N],sttop,flag;

void tarjan(int u,int fa)
{
/*	stacku[sttop = 1] = u,stackfa[1] = fa,stacki[1] = head[u],stackv[1] = 0;
	while (sttop)
	{
		if (stacki[sttop] == head[stacku[sttop]])
			dfn[stacku[sttop]] = low[stacku[sttop]] = ++dfncnt,st[++top] = stacku[sttop];
		if (stackv[sttop]
			low[stacku[sttop]] = std::min(stacku[sttop],low[stackv[sttop]]);
		flag = 0;
		for (int i = stacki[sttop];i;i = next[i])
			if (ver[i] != stackfa[sttop])
				if (dfn[ver[i]])
					low[stacku[sttop]] = std::min(low[stacku[sttop]],dfn[ver[i]]);
				else
				{
					stacki[sttop] = next[i],stackv[sttop] = ver[i],++sttop;
					stacku[sttop] = ver[i],stackfa[sttop] = stacku[sttop-1],stacki[sttop] = head[ver[i]],stackv[sttop] = 0;
					flag = 1;
					break;
				}
		if (flag))
			continue;
		u = stacku[sttop];
		if (low[u] == dfn[u])
		{
			++colcnt;
			while (st[top] != u)
				col[st[top]] = colcnt,--top;
			col[u] = colcnt,--top;
		}
		--sttop;
	}*/
	dfn[u] = low[u] = ++dfncnt,st[++top] = u;
	for (int i = head[u];i;i = next[i])
		if (ver[i] != fa)
			if (dfn[ver[i]])
				low[u] = std::min(low[u],dfn[ver[i]]);
			else
				tarjan(ver[i],u),low[u] = std::min(low[u],low[ver[i]]);
	if (low[u] == dfn[u])
	{
		++colcnt;
		while (st[top] != u)
			col[st[top]] = colcnt,--top;
		col[u] = colcnt,--top;
	}
}

void dfs(int u,int fa)
{
	int uu = u-n,vv;
	dp[uu][0] = dp[uu][1] = 1,edgesum[uu] = edgecnt[uu] = edgecnt[uu]/2;
	for (int i = head[u];i;i = next[i])
		if (ver[i] != fa)
		{
			vv = ver[i]-n,dfs(ver[i],u);
			edgesum[uu] += edgesum[vv]+1,extra = (extra+dp[vv][1]*pow2[m-edgesum[vv]-1])%Mod;
			dp[uu][0] = dp[uu][0]*2*dp[vv][0]%Mod;
			dp[uu][1] = dp[uu][1]*(2*dp[vv][0]+dp[vv][1])%Mod;
		}
	dp[uu][0] = dp[uu][0]*pow2[edgecnt[uu]]%Mod;
	dp[uu][1] = ((dp[uu][1]*pow2[edgecnt[uu]+sz[uu]]-dp[uu][0])%Mod+Mod)%Mod;
}

long long mod(long long x)
{
	return x < Mod?x:x-Mod;
}

int main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	scanf("%d%d",&n,&m),pow2[0] = 1;
	for (int i = 1;i <= m;++i)
		scanf("%d%d",&u,&v),add_edge(u,v),add_edge(v,u);
	for (int i = 1;i <= m+n;++i)
		pow2[i] = mod(pow2[i-1]*2);		
	tarjan(1,0);
	for (int i = 1;i <= n;++i)
	{
		for (int j = head[i];j;j = next[j])
			if (col[ver[j]] != col[i])
				add_edge(n+col[i],n+col[ver[j]]);
			else
				++edgecnt[col[i]];
		++sz[col[i]];
	}
	dfs(n+1,0),printf("%lld\n",(dp[1][0]+dp[1][1]+extra-pow2[m]+Mod)%Mod);
	return 0;
}
