//Private Eye, dancing with the wind.
#include<bits/stdc++.h>
using namespace std;

#define MAXN 500005
#define MAXN2 1000005
#define MOD 1000000007
#define inv2 500000004

int two[MAXN2];
inline void init()
{
	two[0]=1;
	for(int i=1;i<MAXN2;i++)
		two[i]=two[i-1]*2ll%MOD;
}

int head[MAXN],nxt[MAXN2<<1],ver[MAXN2<<1],tot=1;
inline void add(int x,int y)
{
	ver[++tot]=y,nxt[tot]=head[x],head[x]=tot;
}

int dfn[MAXN],low[MAXN],num;
bool bri[MAXN2<<1];
inline void tarjan(int x,int in_edge)
{
	dfn[x]=low[x]=++num;
	for(int i=head[x];i;i=nxt[i])
	{
		int y=ver[i];
		if(!dfn[y])
		{
			tarjan(y,i);
			low[x]=min(low[x],low[y]);
			if(dfn[x]<low[y]) bri[i]=bri[i^1]=1;
		}
		else if(i!=(in_edge^1))
			low[x]=min(low[x],dfn[y]);
	}
}
int ua[MAXN],c[MAXN],cnt;
bool v[MAXN];
inline void qwq(int x)
{
	if(v[x]) return;
	v[x]=1,c[x]=cnt,ua[cnt]++;
	for(int i=head[x];i;i=nxt[i])
	{
		if(bri[i]) continue;
		qwq(ver[i]);
	}
}
vector<int> g[MAXN];

int n,m,ans,f[MAXN][2];
//inline void dfs(int x,int fath)
//{
//	f[x][1]=(two[ua[x]]-1+MOD)%MOD;
//	int tot=1;
//	for(int i=0;i<(int)g[x].size();i++)
//	{
//		int y=g[x][i];
//		if(y==fath) continue;
//		dfs(y,x);
//		tot=1ll*tot*(1ll*(f[y][0]+f[y][1])%MOD*inv2%MOD+1)%MOD;
//	}
//	f[x][0]=1ll*(tot-1+MOD)%MOD;
//	f[x][1]=1ll*f[x][1]*tot%MOD;
//}
inline void dfs(int x,int fath)
{
	f[x][1]=(two[ua[x]]-1+MOD)%MOD;
	int tot=1,tot2=0;
	for(int i=0;i<(int)g[x].size();i++)
	{
		int y=g[x][i];
		if(y==fath) continue;
		dfs(y,x);
		tot=1ll*tot*(1ll*(f[y][0]+f[y][1])%MOD*inv2%MOD+1)%MOD;
		tot2=(1ll*tot2+1ll*f[y][0]+1ll*f[y][1])%MOD;
	}
	ans=((1ll*ans+1ll*tot-1ll-1ll*tot2*inv2%MOD)%MOD+MOD)%MOD;
	f[x][0]=(tot-1+MOD)%MOD;
	f[x][1]=1ll*f[x][1]*tot%MOD;
}

inline int read()
{
	int s=0;
	char c=getchar();
	while(c<'0') c=getchar();
	while(c>='0') s=(s<<1)+(s<<3)+(c^48),c=getchar();
	return s;
}

int main()
{
 	freopen("barrack.in","r",stdin);
 	freopen("barrack.out","w",stdout);
 	init();
	n=read(),m=read();
	for(int i=1;i<=m;i++)
	{
		int s1=read(),s2=read();
		add(s1,s2),add(s2,s1);
	}
	tarjan(1,0);
	for(int i=1;i<=n;i++)
		if(!v[i]) cnt++,qwq(i);
	for(int x=1;x<=n;x++)
		for(int i=head[x];i;i=nxt[i])
		{
			if(!bri[i]) continue;
			int y=ver[i];
			g[c[x]].push_back(c[y]);
		}
	dfs(1,0);
	for(int i=1;i<=cnt;i++)
		(ans+=f[i][1])%=MOD;
	ans=1ll*ans*two[m]%MOD;
	printf("%d",ans);
}
//8:50 -- 10:16