public function provideData($ignoreStates = false, $model = null, $defaultValue = 0) {
		if (!isset($this->Controller->Countries)) {
			$this->Controller->Countries = TableRegistry::get('Data.Countries');
		}
		$countries = $this->Controller->Countries->findActive()->hydrate(false)->find('list')->toArray();

		$states = [];
		if ($model === null) {
			$model = $this->Controller->modelClass;
		}

		if (!isset($this->Controller->States)) {
			$this->Controller->States = TableRegistry::get('Data.States');
		}

		$selectedCountry = $this->Controller->request->getQuery('country_id');
		if (!empty($this->Controller->request->data['country_id'])) {
			$selectedCountry = $this->Controller->request->data['country_id'];
		}

		if ($selectedCountry) {
			$states = $this->Controller->States->getListByCountry($selectedCountry);
		} elseif ($ignoreStates === true) {
			# do nothing
		} else {
			# use the id of the first country of the country-list
			foreach ($countries as $key => $value) {
				$states = $this->Controller->States->getListByCountry($key);
				break;
			}
		}
		$this->Controller->set(compact('countries', 'states', 'defaultValue'));
	}