@FXML
    void actionSimulateBuys(ActionEvent event) {
    	
    	printSuccess("creating_random");
    	
    	int amount = 0;
    	
    	try {
    		amount = Integer.parseInt(fieldAmountRandomTickets.getText());
    	} catch (NumberFormatException e) {
    		printError("random_error");
    		return;
    	}
    	
    	if (amount<=0 || amount > MAX_SIMULATION_NUMBER) {
    		printError("random_error");
    		return;
    	}
    	
    	Random rand = new Random();
    	
    	int[] validityDurations = new int [validityList.size()];
    	for (int i=0; i<validityList.size(); i++)
    		validityDurations[i] = Integer.parseInt(validityList.get(i));
    	
    	int validityDuration=0;
    	int[] mainNumbers = null;
    	int[] starNumbers = null;
    	int amountSuperStars=0;
    	String[] superStars = null;
    	
    	for (int i=0; i<amount; i++) {
    		validityDuration = validityDurations[rand.nextInt(validityDurations.length)];
    		mainNumbers = LottoMachine.getRandomNumbers(LottoMachine.getAmountMainNumbers(), LottoMachine.getMinMainNumber(), LottoMachine.getMaxMainNumber());
    		starNumbers = LottoMachine.getRandomNumbers(LottoMachine.getAmountStarNumber(), LottoMachine.getMinStarNumber(), LottoMachine.getMaxStarNumber());
    		amountSuperStars = rand.nextInt(5);
    		superStars = new String[amountSuperStars];
    		for (int j=0; j<amountSuperStars; j++)
    			superStars[j] = LottoMachine.generateSuperStar();
    		
    		try {
    			marshalHandler.addMultipleTickets(validityDuration, mainNumbers, starNumbers, superStars);
    		} catch (Exception e) {
    			printError("xml_save_error");
    			return;
    		}
    	}
    	
    	
    	try {
			marshalHandler.saveLotteryTickets();
		} catch (JAXBException e) {
			printError("xml_save_error");
			return;
		}
		printSuccess("successful_random");
    	
    }