public long recursiveAddition(int depth, int index) {
		long valueLeft=0;
		long valueRight=0;
		long valueBiggest;
		
//		calculatedPath.append(depth);
//		calculatedPath.append(index);
		
		if (depth==0){ // || if the value is already known
			calculatedPath.append(depth);
			calculatedPath.append(index);
			memoString.add(calculatedPath.toString());
			memoLong.add(inputArrayList[depth][index]);
			return inputArrayList[depth][index];
		}
		if (memoString.contains(calculatedPath.toString())){
			int tempIndex;
			
			tempIndex = memoString.indexOf(calculatedPath.toString());
			
//			calculatedPath.delete(calculatedPath.length()-Integer.toString(index).length(),calculatedPath.length());
//			calculatedPath.delete(calculatedPath.length()-Integer.toString(depth).length(),calculatedPath.length());
			
			return memoLong.get(tempIndex);
			
		}else{
		
			//go right
			if (index!=0){
				valueLeft = recursiveAddition(depth-1, index-1);
				calculatedPath.append(depth);
				calculatedPath.append(index);
				memoString.add(calculatedPath.toString());
				memoLong.add((inputArrayList[depth][index])+valueLeft);
			}
			//go left
			if (index!=depth){
			valueRight = recursiveAddition(depth-1, index);
			calculatedPath.append(depth);
			calculatedPath.append(index);
			memoString.add(calculatedPath.toString());
			memoLong.add((inputArrayList[depth][index])+valueRight);
			}
			if (valueLeft>valueRight){
				valueBiggest = valueLeft;
			} else{ 
				valueBiggest = valueRight;
			}
			
			valueBiggest += inputArrayList[depth][index];
			
			//return memo
			return valueBiggest;
			}
	}