private static WireConnection[] removeWire(WireConnection[] currentArray, WireConnection toBeRemoved){
		if(currentArray == null || currentArray.length == 0){
			return new WireConnection[0];
		}
		if(currentArray.length == 1 && currentArray[0].equals(toBeRemoved)){
			return new WireConnection[0];
		}
		int idx = -1;
		for(int i = 0; i < currentArray.length; i++){
			if(currentArray[i].equals(toBeRemoved)){
				idx = i;
				break;
			}
		}
		if(idx == -1){
			return currentArray;
		}
		
		WireConnection[] newArray = new WireConnection[currentArray.length-1];
		int i = 0;
		for(int j = 0; j < currentArray.length; j++){
			if(j != idx){
				newArray[i] = currentArray[j];
				i++;
			}
		}
		return newArray;
	}