public function command(array $data, $options = [], &$hash = null)
    {
        try {
            $cursor = new \MongoCommandCursor($this->connection, $this->name, $data);
            $cursor->setReadPreference($this->getReadPreference());

            return iterator_to_array($cursor)[0];
        } catch (\MongoDB\Driver\Exception\Exception $e) {
            return ExceptionConverter::toResultArray($e);
        }
    }