#include<iostream>
#include<cstdio>
#include<stack>
#include<vector>
using namespace std;
const int N=500005,M=1000005;
const int MOD=1000000007;
int n,m;
struct Edge
{
	int to,next;
}edge[M<<1];
int head[N],cnt;
void add_edge(int u,int v)
{
	cnt++;
	edge[cnt].to=v;
	edge[cnt].next=head[u];
	head[u]=cnt;
	return;
}
int dfn[N],low[N],Index;
bool book[N];
stack<int>s;
vector<int>block[N],G[N];
int bel[N],c[N];
int tot;
void tarjan(int u,int father)
{
	dfn[u]=low[u]=++Index;
	book[u]=true;
	s.emplace(u);
	for(int i=head[u];i;i=edge[i].next)
	{
		int v=edge[i].to;
		if(v==father) continue;
		if(!dfn[v])
		{
			tarjan(v,u);
			low[u]=min(low[u],low[v]);
		}
		else if(book[v]) low[u]=min(low[u],dfn[v]);
	}
	if(dfn[u]==low[u])
	{
		tot++;
		while(!s.empty()&&s.top()!=u)
		{
			block[tot].emplace_back(s.top());
			bel[s.top()]=tot;
			book[s.top()]=false;
			s.pop();
		}
		block[tot].emplace_back(u);
		bel[u]=tot;
		book[u]=false;
		s.pop();
	}
	return;
}
int pw2[M];
int f[N],g[N];
int dp[N];
int sumc[N];
void dfs(int u,int father)
{
	sumc[u]=c[u];
	for(int v:G[u])
	{
		if(v==father) continue;
		dfs(v,u);
		sumc[u]+=sumc[v]+1;
	}
	f[u]=0;
	int pf=1,pg=1;
	for(int v:G[u])
	{
		if(v==father) continue;
		pf=(long long)pf*(f[v]+2ll*g[v]%MOD)%MOD;
		pg=(long long)pg*(2ll*g[v]%MOD)%MOD;
	
	}
	f[u]=(f[u]+(long long)pf*pw2[c[u]]%MOD*(pw2[block[u].size()])%MOD)%MOD;
	f[u]=(f[u]-(long long)pg*pw2[c[u]]%MOD+MOD)%MOD;
	g[u]=(long long)pg*pw2[c[u]]%MOD;
	return;
}
int main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	scanf("%d%d",&n,&m);
	for(int i=1;i<=m;i++)
	{
		int x,y;
		scanf("%d%d",&x,&y);
		add_edge(x,y);
		add_edge(y,x);
	}
	tarjan(1,0);
	for(int x=1;x<=n;x++)
		for(int i=head[x];i;i=edge[i].next)
		{
			int y=edge[i].to;
			int u=bel[x],v=bel[y];
			if(u==v) c[u]++;
			else G[u].emplace_back(v);
		}
	for(int i=1;i<=tot;i++)
		c[i]/=2;
	pw2[0]=1;
	for(int i=1;i<=m;i++)
		pw2[i]=(pw2[i-1]+pw2[i-1])%MOD;
//	cerr<<"bel"<<bel[1]<<"\n";
	dfs(1,0);
	int ans=0;
	for(int i=1;i<=tot;i++)
		ans=(ans+(long long)f[i]*pw2[max(m-sumc[i]-1,0)])%MOD;
	printf("%d",ans);
//	cerr<<f[1]<<"\n";
	return 0;
}