@Override
    public void doSteps(){
        stuck = true;
        double etime = System.currentTimeMillis() + repTime;
        int i = 0;

        while((  (nrOfSteps > 0 && i < nrOfSteps)
                  || (repTime > 0 && System.currentTimeMillis() < etime) )){

            // run Local Search step
            nh.genRandomNeighbor(core, unselected);
            newScore = pm.calculate(core, cacheId);
            newSize = core.size();

            if (newScore > score || (newScore == score && newSize < size)) {
                // Accept new (better) core!
                score = newScore;
                size = newSize;
                // Improvement!
                stuck = false;
            } else {
                // Reject new core
                nh.undoLastPerturbation(core, unselected);
            }

            i++;
        }
    }