public function createAccountStates(array $data = [])
    {
        $accountStates = new AccountStates();

        if (array_key_exists('rated', $data)) {
            if ($data['rated']) {
                $rating = new Rating();

                $accountStates->setRated($this->hydrate($rating, $data['rated']));
            } else {
                $accountStates->setRated(false);
            }
        }

        return $this->hydrate($accountStates, $data);
    }