#include <bits/stdc++.h>
using namespace std;
inline int read() {
  char ch = getchar();
  int w = 1, c = 0;
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') w = -1;
  for (; isdigit(ch); ch = getchar()) c = (c << 1) + (c << 3) + (ch ^ 48);
  return w * c;
}
const int M = 3003, mod = 1e9 + 7;
int f[M][M], n, m;
char ch[M];
bool mp[M][M];
long long dp(int x, int y, int s, int t) {
  memset(f, 0, sizeof f);
  f[x][y] = 1;
  for (int i = (x); i <= (s); ++i) {
    for (int j = (y); j <= (t); ++j) {
      if (mp[i][j]) continue;
      if (i > x && !mp[i - 1][j]) f[i][j] = (f[i][j] + f[i - 1][j]) % mod;
      if (j > y && !mp[i][j - 1]) f[i][j] = (f[i][j] + f[i][j - 1]) % mod;
    }
  }
  return f[s][t];
}
int main() {
  n = read();
  m = read();
  for (int i = (1); i <= (n); ++i) {
    scanf("%s", ch + 1);
    for (int j = (1); j <= (m); ++j) {
      if (ch[j] == '#') mp[i][j] = 1;
    }
  }
  cout << (1ll * dp(2, 1, n, m - 1) * dp(1, 2, n - 1, m) % mod + mod -
           dp(1, 2, n, m - 1) * dp(2, 1, n - 1, m) % mod) %
              mod
       << "\n";
  return 0;
}
