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

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

                // run Tabu Search step

                // ALWAYS accept new core, even it is not an improvement
                addIndex = nh.genBestNeighbor(core, unselected, tabuList, bestScore, pm, cacheId);
                score = pm.calculate(core, cacheId);
                size = core.size();


                // check for improvement
                if(score > bestScore || (score == bestScore && size < bestCore.size())){
                    //System.out.println(coreHash);
                    stuck = false;
                    bestCore.clear();
                    bestCore.addAll(core);
                    lastImpr =  score - bestScore;
                    bestScore = score;
                }

                // finally, update tabu list
                if(tabuList.size() == tabuListSize){
                    // capacity reached, remove oldest tabu index
                    tabuList.poll();
                }
                // add new tabu index
                //tabuList.offer(addIndex);
                tabuList.offer(addIndex);

                i++;
            }
        }
    }