private static boolean binarySearchArray(ListItem[] items, String target) {

        ListItem retVal = null;
        System.out.println("Binary Searching for " + target + ".");
        ListItem currentItem = new ListItem();
        boolean isFound = false;
        int counter = 0;
        int low  = 0;
        int high = items.length-1; // because 0-based arrays
        while ( (!isFound) && (low <= high)) {
            int mid = Math.round((high + low) / 2);
            currentItem = items[mid];
            if (currentItem.getName().equalsIgnoreCase(target)) {
                // We found it!
                isFound = true;
                retVal = currentItem;
            } else {
                // Keep looking.
                counter++;
                if (currentItem.getName().compareToIgnoreCase(target) > 0) {
                    // target is higher in the list than the currentItem (at mid)
                    high = mid - 1;
                } else {
                    // target is lower in the list than the currentItem (at mid)
                    low = mid + 1;
                }
            }
        }
    	if (isFound) {
    		System.out.println("Here is the "+ target +" you asked for.");
    		System.out.println("this will be "+ currentItem.getCost()+" dollars");
    		System.out.println("Are you ready to purchase this item? Enter yes to buy or no to not buy.");
    		String buy = transactionDone.nextLine();
    		if(buy.equalsIgnoreCase("yes")&&money.getAmount()>=currentItem.getCost()){
    			
    			
    		}else if (buy.equalsIgnoreCase("yes")&&money.getAmount()<currentItem.getCost()){
    			System.out.println("Uhmmm... I'm sorry but I can't help you.");
    			System.out.println("Either you didn't clearly say 'Yes' or 'No'");
    			System.out.println("or you simply don'y have enough money.");
    			return false;
    		}	
    			if (buy.equalsIgnoreCase("Yes")) {
    			purchase=currentItem;
    			newBag.add(currentItem.getName());
    			return true;
    			
    		}
    		else if(buy.equalsIgnoreCase("No")){
    			System.out.println("Goodbye :)");
    			
    		} 		
    	} else {
    		System.out.println("Sorry, I couldn't find " + target + " in my stock. \nCheck your inventory to see if you have already purchased the item. \nYou also could have asked for an item I don't have. \n");
    		return false;
}
    	return false;
    	}