#include<bits/stdc++.h>
using namespace std;
const long long mod=1e9+7;
vector<int> v[1000001],w[1000001];
int dfn[1000001],low[1000001],tot;
int st[1000001],top,col[1000001],cnt;
long long qpow(long long a,long long b)
{
	long long res=1;
	if(b<0)return 1;
	while(b)
	{
		if(b&1)res=res*a%mod;
		a=a*a%mod;
		b>>=1;
	}
	return res;
}
void tar(int x,int fa,int s)
{
//	cout<<x<<" "<<tot<<" "<<s<<" "<<fa<<endl;
	tot++;
//	cout<<x<<" "<<mp[x]<<endl;
	dfn[x]=low[x]=tot;
	top++;st[top]=x;
	for(int i=0;i<v[x].size();i++)
	{
		int y=v[x][i];
//		cout<<y<<" "<<i<<endl;
		if(y==fa)continue;
		if(dfn[y]==0){
			tar(y,x,s+1);
			low[x]=min(low[x],low[y]);
		}
		else if(y!=fa){
			low[x]=min(low[x],dfn[y]);
		}
//		cout<<x<<" "<<dfn[x]<<" "<<low[x]<<endl;
	}
	if(dfn[x]==low[x])
	{
//		cout<<x<<" "<<cnt<<endl;
		cnt++;
		while(st[top]!=x)
		{
//			cout<<st[top]<<endl;
			col[st[top]]=cnt;
			top--;
		}
		col[st[top]]=cnt;
		top--;
	}
}
long long f[1000001],s[1000001],size[1000001],sm;
void dfs(int x,int fa)
{
//	cout<<x<<" "<<fa<<endl;
	long long sum=qpow(2,s[x])*qpow(2,size[x])%mod;
//	cout<<x<<" "<<sum<<endl;
	for(int i=0;i<w[x].size();i++)
	{
		int y=w[x][i];
		if(y==fa)continue;
		dfs(y,x);
		s[x]+=s[y]+1;
//		cout<<x<<" "<<y<<" "<<f[y]<<" "<<s[y]<<endl;
		sum=(sum*((f[y]+qpow(2,s[y]+1))%mod)%mod)%mod;
	}
//	f[x]=qpow(2,s[x])*qpow(2,size[x])%mod;
	for(int i=0;i<w[x].size();i++)
	{
		int y=w[x][i];
		if(y==fa)continue;
//		sum=(sum+f[y]*qpow(2,s[x]-s[y]-1)%mod)%mod;
	}
	f[x]=(sum-qpow(2,s[x])+mod)%mod;
//	cout<<' '<<x<<" "<<f[x]<<" "<<sum<<endl;
}
int main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	int n,m;
	scanf("%d %d",&n,&m);
	int xx,yy;
	for(int i=1;i<=m;i++)
	{
		scanf("%d %d",&xx,&yy);
		v[xx].push_back(yy);
		v[yy].push_back(xx);
//		cout<<xx<<" "<<yy<<endl;
	}
	tar(1,0,0);
	for(int i=1;i<=n;i++)
	{
		size[col[i]]++;
//		cout<<" "<<col[i]<<endl;
		for(int j=0;j<v[i].size();j++)
		{
			int y=v[i][j];
			if(col[y]!=col[i])
			{
				w[col[i]].push_back(col[y]);
//				cout<<col[i]<<" "<<col[y]<<endl;
			}
			else
			{
				s[col[i]]++;
			}
			sm++;
		}
	}
	sm/=2;
	for(int i=1;i<=cnt;i++)
	{
		s[i]/=2;
//		cout<<size[i]<<endl;
	}
	dfs(1,0);
	long long ss=f[1];
//	cout<<s[1]<<" "<<sm<<endl;
	for(int i=2;i<=cnt;i++)
	{
//		cout<<f[i]<<endl;
		ss=(ss+f[i]*qpow(2,sm-s[i]-1)%mod)%mod;
	}
	printf("%lld\n",(ss)%mod);
	return 0;
}