protected void _buy(String title, int quantity, boolean limit_check) {

		CurrentDVD cdvd = dvd_collection.get(title);

		/* title does not exist */
		if (cdvd == null)
			throw new IllegalArgumentException(SessionErrors.DVD_NOT_FOUND);
		if (quantity <= 0)
			throw new IllegalArgumentException(
					SessionErrors.INVALID_DVD_QUANTITY);
		if (limit_check) {
			if (quantity > BUY_COPIES_LIMIT)
				throw new IllegalArgumentException(
						SessionErrors.EXCEEDING_DVD_QUANTITY.replaceAll(
								"\\{1\\}", "" + BUY_COPIES_LIMIT));
		} else {
			if (cdvd.getCount() - quantity < 0)
				throw new IllegalArgumentException(
						SessionErrors.NOT_ENOUGH_DVDS);
		}
		if (cdvd.getStatus() != DVDStatus.SALE)
			throw new IllegalArgumentException(SessionErrors.DVD_NOT_FOR_SALE);
		if (cdvd.getCount() < quantity)
			throw new IllegalArgumentException(SessionErrors.NOT_ENOUGH_DVDS);

		/* subtract brought copies from total */
		try {
			cdvd.setCount(cdvd.getCount() - quantity);
		} catch (DVDFormatException e) {
			throw new IllegalArgumentException(e.getMessage());
		}

		/* add to transaction history */
		try {
			transactions.add(new DVDTransaction(TransactionID.BUY, title,
					quantity, DVDStatus.SALE, cdvd.getPrice()));
		} catch (TransactionFormatException e) {
			throw new IllegalArgumentException(e.getMessage());
		}
	}