#include<bits/stdc++.h>
using namespace std;
const int N=5e5+5,mod=1e9+7;
const long long inv2=(mod+1)/2;
int n,m,dfn[N],dfncnt,low[N],st[N],tp,no[N],cnt;
long long val[N],F[N],G[N],ans;
int head[N],nxt[N<<2],ver[N<<2],tot;
int headc[N],nxtc[N<<2],verc[N<<2],totc;
set<pair<int,int> > S;
void add(int u,int v){
	ver[++tot]=v;
	nxt[tot]=head[u];
	head[u]=tot;
}
void addc(int u,int v){
	verc[++totc]=v;
	nxtc[totc]=headc[u];
	headc[u]=totc;
}
int power(int a,int b){
	int c=1;
	for(;b;b>>=1){
		if(b&1)c=1ll*c*a%mod;
		a=1ll*a*a%mod;
	}
	return c;
}
void tarjan(int u,int fa){
	low[u]=dfn[u]=++dfncnt;st[++tp]=u;
	for(int i=head[u];i;i=nxt[i]){
		int v=ver[i];
		if(!dfn[v]){
			tarjan(v,u);
			low[u]=min(low[u],low[v]);
		}
		else if(v!=fa)low[u]=min(low[u],dfn[v]);
	}
	if(low[u]==dfn[u]){
		++cnt;no[u]=cnt;val[cnt]=2;
		while(st[tp]!=u){
			val[cnt]=2*val[cnt]%mod;
			no[st[tp]]=cnt;
			tp--;
		}tp--;
	}
}
void dp(int u,int fa){
	F[u]=1;
	for(int i=headc[u],v;i;i=nxtc[i])
		if((v=verc[i])!=fa){
			dp(v,u);
			G[u]=(G[u]+F[v]+G[v]*val[v]%mod+val[v]-1)%mod;
			F[u]=F[u]*(inv2*(F[v]+G[v]*(val[v]-1)%mod+val[v]-1)%mod+1)%mod;
		}
	G[u]=G[u]*inv2%mod;
	F[u]=(F[u]-G[u]-1+mod)%mod*val[u]%mod;
}
int main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	scanf("%d%d",&n,&m);
	for(int i=1,u,v;i<=m;i++){
		scanf("%d%d",&u,&v);
		add(u,v);add(v,u);
	}
	tarjan(1,-1);
	for(int i=1;i<=n;i++)
		for(int j=head[i];j;j=nxt[j])
			if(no[i]!=no[ver[j]]&&S.find(make_pair(no[i],no[ver[j]]))==S.end()){
				addc(no[i],no[ver[j]]);
				S.insert(make_pair(no[i],no[ver[j]]));
			}
	dp(1,-1);
	for(int u=1;u<=cnt;u++)ans=(ans+F[u]+G[u]*(val[u]-1)%mod+val[u]-1)%mod;
	ans=ans*power(2,m)%mod;
	printf("%lld\n",ans);
	return 0;
}
