if (before && before.length == 2) {
    before(txn, ready);
  } else if (before) {
    before(txn);
    ready();