#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int add(int a, int b) { return (a + b) % mod; }
int mul(int a, int b) { return ((long long)a * b) % mod; }
char g[250][250];
char tmp[250][250];
int n, m;
int dp[255][(1 << 15)][2][2];
int getPos(int r, int c) { return r * m + c; }
int mnwr(int mask, int bit) { return (mask & (1 << bit)) > 0; }
int nwr(int mask, int bit) { return mask | (1 << bit); }
int dlm(int mask, int bit) { return mask & (INT_MAX ^ (1 << bit)); }
int solve(int r, int c, int mask, bool taken, bool bef) {
  if (r == n) return 1;
  if (c == m) return solve(r + 1, 0, mask, taken, 0);
  int pos = r * m + c;
  int &ans = dp[pos][mask][taken][bef];
  if (~ans) return ans;
  ans = 0;
  if (g[r][c] == '.') {
    ans = solve(r, c + 1, nwr(mask, c), taken, 1);
    if (mnwr(mask, c) || bef)
      ans = add(ans, solve(r, c + 1, mask, taken, bef));
    else if (!taken)
      ans = add(ans, solve(r, c + 1, mask, 1, 0));
  } else
    ans = add(ans, solve(r, c + 1, dlm(mask, c), taken, 0));
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> g[i][j];
    }
  }
  if (m > n) {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        tmp[j][i] = g[i][j];
      }
    }
    swap(n, m);
    for (int i = 0; i < n; i++)
      for (int j = 0; j < m; j++) g[i][j] = tmp[i][j];
  }
  memset(dp, -1, sizeof dp);
  cout << solve(0, 0, 0, 0, 0);
  return 0;
}
