#include<bits/stdc++.h>
#define int long long
using namespace std;
const int N=1e6+10,M=1e9+7;
int n,m,ans,f[N][2],szp[N],sze[N];
vector<int> g[N];
int qp(int x,int y){
	int res=1;
	if(y<0) y+=M-1;
	while(y){
		if(y&1) res=res*x%M;
		x=x*x%M;
		y>>=1;
	}
	return res;
}
void dfs(int x,int fa){
	szp[x]=1;
	int sm0=1,sm1=1,sm2=0;
	for(int y:g[x]){
		if(y==fa) continue;
		dfs(y,x);
		szp[x]+=szp[y];
		sze[x]+=sze[y]+1;
		f[x][1]+=f[y][1];
		sm2=(sm2+f[y][0])%M;
		sm0=sm0*f[y][0]*2%M;
		sm1=sm1*(f[y][0]*2+f[y][1])%M;
	}
	f[x][0]=qp(2,sze[x]);
	f[x][1]=(f[x][1]+sm1*2-sm0)%M;
	for(int y:g[x]){
		if(y==fa) continue;
		f[x][1]=(f[x][1]+(sm2-f[y][0]+M)%M*f[y][1]%M)%M;
	}
}
signed main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	ios::sync_with_stdio(0);
	cin.tie(0),cout.tie(0);
	cin>>n>>m;
	for(int i=1;i<=m;i++){
		int u,v;
		cin>>u>>v;
		g[u].push_back(v);
		g[v].push_back(u);
	}
	cout<<(n*qp(2,n-1)%M+n*(n-1)%M*qp(2,n-3)%M)%M;
//	dfs(1,0);
//	cout<<f[1][1]-1;
	return 0;
}
