//妹子when???
#include<bits/stdc++.h>
#define pb push_back
#define pc putchar
#define fi first
#define se second
#define eb emplace_back
#define lc (x<<1)
#define rc (x<<1|1)
#define mid ((l+r)>>1)
#define mp make_pair
#define mt make_tuple
#define chkmn(a,b) (a)=min((a),(b))
#define chkmx(a,b) (a)=max((a),(b))
using namespace std;
template<class T>void read(T&x){
	char c=getchar();bool f=0;x=0;
	for(;!isdigit(c);c=getchar())if(c=='-')f=1;
	for(;isdigit(c);c=getchar())x=x*10+c-'0';
	if(f)x=-x;
}
template<class T,class ...Arg>void read(T&x,Arg&...arg){read(x);read(arg...);}
template<class T>void write(T x){
	if(x<0)x=-x,pc('-');
	if(x>=10)write(x/10);
	pc(x%10+'0');
}
template<class T,class ...Arg>void write(T x,Arg ...arg){write(x);pc(' ');write(arg...);}
template<class ...Arg>void writeln(Arg ...arg){write(arg...);pc('\n');}
const int mod=1e9+7;
struct mint{
	int x;mint(int o=0){x=o;}
	mint&operator+=(mint b){return(x+=b.x)%=mod,*this;}
	mint&operator-=(mint b){return(x-=b.x)%=mod,*this;}
	mint&operator*=(mint b){return(x=1ll*x*b.x%mod),*this;}
	friend mint operator+(mint a,mint b){return a+=b;}
	friend mint operator-(mint a,mint b){return a-=b;}
	friend mint operator*(mint a,mint b){return a*=b;}
};
const mint inv2=(mod+1)/2;
const int N=1e6+10;
int n,m,u[N],v[N];vector<pair<int,int>>e[N];
bool bridge[N];int dfn[N],low[N],cnt;
int col[N],tot;
mint a[N/2];vector<int>g[N/2];
void dfs1(int u,int lste){
	low[u]=dfn[u]=++cnt;
	for(auto E:e[u]){
		int v,id;tie(v,id)=E;
		if(id==lste)continue;
		if(!dfn[v]){
			dfs1(v,id);chkmn(low[u],low[v]);
			if(low[v]>dfn[u])bridge[id]=1;
		}else chkmn(low[u],dfn[v]);
	}
}
void dfs2(int u){
	col[u]=tot;a[tot]*=2;
	for(auto E:e[u]){
		int v,id;tie(v,id)=E;
		if(bridge[id])continue;
		if(!col[v])dfs2(v);
	}
}
mint dp[N/2],ans;
void dfs3(int u,int fa){
	mint A=0,B=0;//A表示一棵选的权值和，B表示至少两棵内部选的权值和
	for(auto v:g[u])if(v!=fa){
		dfs3(v,u);
		B+=(B+A)*dp[v]*inv2;
		A+=dp[v]*inv2;
		
	}
	ans+=a[u]+a[u]*A+(1+a[u])*B;
	dp[u]=a[u]+(1+a[u])*(A+B);
}
signed main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	read(n,m);
	for(int i=1;i<=m;i++)read(u[i],v[i]),e[u[i]].eb(v[i],i),e[v[i]].eb(u[i],i);
	dfs1(1,0);
	for(int i=1;i<=n;i++)if(!col[i])a[++tot]=1,dfs2(i);
	for(int i=1;i<=tot;i++)a[i]-=1;
	for(int i=1;i<=m;i++)if(bridge[i])
		u[i]=col[u[i]],v[i]=col[v[i]],g[u[i]].pb(v[i]),g[v[i]].pb(u[i]);
	dfs3(1,0);
	for(int i=1;i<=m;i++)ans*=2;
	writeln(ans.x);
	return 0;
}
