private void recurseUsageGroup(ArrayList<Appliance> appLst, int[] prevLoadMinus, int appNo, int usageGroupNo, int[] CurrWh, int MAXTIME, float[] minCost, int[] minLoads){
		
		if (appNo<appUsages.size()){
			// put some load here
			int[] currWh = new int[CurrWh.length];
			// copy the currWh
			
			
			ArrayList<Timeslot> timeslots = appUsages.get(appNo).get(usageGroupNo).timeslots; 
			for (int i=0; i<timeslots.size(); i++){
				int starts = timeslots.get(i).start;
				int ends = timeslots.get(i).end;
				for (int j=starts; j<=ends; j++){
					//..System.out.printf("appNo: %d, usageGroup: %d, timeslot: %d, hour: %d \n",appNo,usageGroupNo,i,j);
					int appIdx = appsIndex.get(appNo);
					int appPower = appLst.get(appIdx).power;
					// always return to original CurrWh
					System.arraycopy(CurrWh, 0, currWh, 0, CurrWh.length);
					int startingTime = j;
					if (startingTime>=MAXTIME) startingTime = startingTime - MAXTIME;  
					Util.consumeElectricity(currWh, startingTime, loadReqs.get(appNo).get(usageGroupNo), appPower, MAXTIME);					
					// we still have next usage group? call
					if (usageGroupNo < appUsages.get(appNo).size()-1){
						recurseUsageGroup(appLst, prevLoadMinus, appNo, usageGroupNo+1, currWh, MAXTIME, minCost, minLoads);
					} else 
					// we are the last usage group. Then, call another appliances
					if (appNo < appUsages.size()-1){						
						recurseUsageGroup(appLst, prevLoadMinus, appNo+1, 0, currWh, MAXTIME, minCost, minLoads);
					} else
					// we are the last usage group, the last user
					{
						// calculate the price
						//System.out.println("currWh: "+Util.fastArrToStr(currWh));
						//System.out.println("prevLoadMinus: "+Util.fastArrToStr(prevLoadMinus));
						
						float price = Util.getPriceFromLoadMinus(currWh, prevLoadMinus);
						//..System.out.printf("minCost: %.3f, price: %.3f \n", minCost[0], price);
						// see if we get lower price
						if (price < minCost[0] ) {
							minCost[0] = price;												
							System.arraycopy(currWh, 0, minLoads, 0, MAXTIME);
						}
					}
				}
			}
			
		}
		
		
			
	}