protected function choosePackage($packages)
    {
        $choose = $this->ask('Select package by number [1]:', '1');
        if (!is_numeric($choose) or !isset($packages[$choose - 1])) {
            $this->error('Incorrect value given!');
            $this->choosePackage($packages);
        } else {
            $index = $choose - 1;
            $result = $packages[$index];
            $this->comment('Your choice: ' . $result->getName());
            $package = $this->getPackage($result->getName());
        }
    }