@Override
    public Integer next() {
        if(head == null){
            if(it.hasNext()){
                head = it.next();
                return head;
            }
            throw new NoSuchElementException();
        }
        int val = head;
        head = null;
        return val;
    }