public ListNode addTwoNumbers(ListNode l1, ListNode l2) {

        //build a new list
        ListNode temp = new ListNode(0);
        ListNode move = temp;
        //record the sum of the value
        int number = 0;

        while (l1 != null || l2 != null) {
            //check if there is 1 the add up
            number = number / 10;

            //add the value from list l1 and l2
            if (l1 != null) {
                number = number + l1.getVal();
                l1 = l1.getNext();
            }
            if (l2 != null) {
                number = number + l2.getVal();
                l2 = l2.getNext();
            }
            //set value into new list
            move.setNext(new ListNode(number % 10));
            move = move.getNext();
        }
        //after l1 and l2, check if we need to create a new node for the carry-over
        if (number / 10 == 1) {
            move.setNext(new ListNode(1));
        }
        //return the new list
        return temp.getNext();
    }