private void split(DoublyLinkedNode curr, int red, int green, int blue,
			int previousRunLength, int nextRunLength) {
		DoublyLinkedNode previousRun, nextRun;
		previousRun = previousRunLength <= 0 ? curr.getPrevious() : new DoublyLinkedNode(new Run((int) curr.getValue().getRed(), (int) curr.getValue().getGreen(), (int) curr.getValue().getBlue(), previousRunLength));
		nextRun = nextRunLength <= 0 ? curr.getNext() : new DoublyLinkedNode(new Run((int) curr.getValue().getRed(),(int) curr.getValue().getGreen(), (int) curr.getValue().getBlue(), nextRunLength));
		curr.getValue().setValue(red, green, blue, 1);
		if (previousRunLength > 0) {
			if (curr.getPrevious() != null)
				curr.getPrevious().setNext(previousRun);
			previousRun.setPrevious(curr.getPrevious());
			previousRun.setNext(curr);
		}
		if (nextRunLength > 0) {
			nextRun.setPrevious(curr);
			nextRun.setNext(curr.getNext());
			if (curr.getNext() != null)
				curr.getNext().setPrevious(nextRun);
		}
		curr.setPrevious(previousRun);
		curr.setNext(nextRun);
		if (curr == runs.head && curr.getPrevious() != null)
			runs.head = curr.getPrevious();
  }