#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mo=1e9+7;
const ll maxn=1e6;
ll read(){
	ll res=0,f=1;char ch=getchar();
	while(!isdigit(ch)){if(ch=='-') f=-f;ch=getchar();}
	while(isdigit(ch)) {res=res*10+(ch-'0');ch=getchar();}
	return res*f;
}
ll n,m;
vector<pair<ll,ll> >e;
vector<ll> g[maxn];
ll d[maxn];

signed main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	n=read(),m=read();
	ll ans=0;
	//e.push_back({0,0});
	for(ll i=1;i<=m;i++) {
		ll u=read(),v=read();
		e.push_back({u,v});
	}
//	puts("ok");
	for(ll i=0;i<=(1ll<<m)-1;i++){
		ll cnt=0;
		for(ll j=0;j<=m-1;j++){
			if(i&(1<<j)){
				ll u=e[j].first;
				ll v=e[j].second;
			//	g[u].push_back(v);
			//	g[v].push_back(u);
				if(d[u]==0) cnt++,d[u]++;
				if(d[v]==0) d[v]++,cnt++;
			}
		}
	//	cout<<" cnt="<<cnt<<"\n";
	//cout<<bitset<4>(i)<<"\n";cout<<ans<<"\n";
	//	cout<<(1<<cnt)<<"\n";
		ans+=((1ll<<cnt)-1ll)%mo;
		ans+=n-cnt;
		ans%=mo;
	//	cout<<ans<<" \n";
		for(ll i=1;i<=n;i++) d[i]=0;
	}
	cout<<(ans)<<"\n";
	return 0;
}
