public Node<Integer> add(Node<Integer> n1, Node<Integer> n2) {
    int base = 16;
    Node<Integer> sum = null;
    Node<Integer> result = null;
    Integer carry = 0;
    for(; n1!=null || n2 != null || carry != 0 ; ) {
      Integer digitsum = (n1 == null ? 0 : n1.value) 
                       + (n2 == null ? 0 : n2.value) + carry;
      carry = digitsum > base-1 ? 1 : 0;
      digitsum -= carry * base;
      if(sum == null) {
        sum = new Node<Integer>(digitsum);
        result = sum;
      } else {
        sum.next = new Node<Integer>(digitsum);
        sum = sum.next;
      }
      n1 = (n1 == null ? null : n1.next);
      n2 = (n2 == null ? null : n2.next);
    }
    return result;
  }