protected void execute() {
        if(timesStarted < REPETITIONS) {
            if(!commandToRepeat.isRunning() && needToStartCommand < START_COMMAND_THRESHOLD) {
                needToStartCommand++;
                button.setPressed(false);
            }
            if(!commandToRepeat.isRunning() && needToStartCommand <= (START_COMMAND_THRESHOLD)){
                button.setPressed(true);
                needToStartCommand++;
            }
            else if(!commandToRepeat.isRunning() && needToStartCommand >= (START_COMMAND_THRESHOLD+1)){
                button.setPressed(false);
                timesStarted++;
                needToStartCommand = 0;
            }
        }
    }