#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=3030,M=5050,Mod=1e9+7;
int n,m;
int head[N],ne[M],to[M],p;
void add(int x,int y){
	to[++p]=y;
	ne[p]=head[x];
	head[x]=p;
}
int stk[N],top,vis[N];
int scc[N],sc,dfn[N],low[N],tot;
int val[N],siz[N];
void tar(int x,int la){
	dfn[x]=low[x]=++tot;
	stk[++top]=x;
	vis[x]=1;
	int fg=0;
	for(int i=head[x];i;i=ne[i]){
		int y=to[i];
		if(y==la)continue;
		if(vis[y]==1){
			low[x]=min(low[x],dfn[y]);
		}else {
			tar(y,x);
			low[x]=min(low[x],low[y]);
		}
	}
	if(dfn[x]==low[x]){
		sc++;
		while(1){
			siz[sc]++;
			scc[stk[top]]=sc;
			vis[stk[top]]=0;
			top--;
			if(stk[top+1]==x)break;
		}
	}
}
int dis[N],fdfn[N],st[N][30];
ll ans=0;
void dfs(int x,int la){
	if(!dfn[scc[x]]){
		dfn[scc[x]]=++tot;
		dis[scc[x]]=dis[scc[la]]+1;
		fdfn[tot]=scc[x];
		st[scc[x]][0]=scc[la];
		//cout<<x<<" "<<la<<endl;
		for(int i=1;i<=25;i++){
			if(dis[scc[x]]<(1<<i)+1)break;
			st[scc[x]][i]=st[st[scc[x]][i-1]][i-1];
		}
	}
	vis[x]=1;
	for(int i=head[x];i;i=ne[i]){
		int y=to[i];
		if(vis[y])continue;
		dfs(y,x);
	}
}
int lca(int x,int y){
	if(x==y)return y;
	if(dis[x]<dis[y])swap(x,y);
	for(int i=25;i>=0;i--){
		if(dis[x]<(1<<i)+1)continue;
		if(dis[st[x][i]]>=dis[y]){
			x=st[x][i];
		}
	}
	if(x==y)return x;
	for(int i=25;i>=0;i--){
		if(dis[x]<(1<<i)+1)continue;
		if(st[x][i]!=st[y][i]){
			x=st[x][i];
			y=st[y][i];
		}
	}
	if(st[x][0]==y)return y;
	return st[y][0];
}
int d(int x,int y){
	//cout<<x<<" "<<y<<" "<<lca(x,y)<<endl;
	return dis[x]+dis[y]-2*dis[lca(x,y)];
}
void bf(int x,int la,int len,int fi,ll sum){
	if(x>sc){
		if(la==0)return;
		len+=d(la,fi);
		len/=2;
		//if(la!=fi)cout<<len<<' '<<(1<<(m-len))<<" "<<sum<<" "<<la<<endl;
		ans+=(ll)(1<<(m-len))*sum;
		ans%=Mod;
		return;
	}
	if(fi==0)
	bf(x+1,fdfn[x],len,fdfn[x],sum*((ll)(1<<siz[fdfn[x]])-1));
	else bf(x+1,fdfn[x],len+d(la,fdfn[x]),fi,sum*((ll)(1<<siz[fdfn[x]])-1));
	bf(x+1,la,len,fi,sum);
}
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(x,y);add(y,x);
	}
	tar(1,0);
	memset(dfn,0,sizeof(dfn));
	memset(vis,0,sizeof(vis));
	tot=0;
	dfs(1,0);
	//for(int i=1;i<=n;i++){
	//	cout<<siz[scc[i]]<<" "<<dfn[scc[i]]<<" "<<scc[i]<<" "<<endl;
	//}
	bf(1,0,0,0,1);
	cout<<ans%Mod<<endl;
	return 0;
}
