private void moveNodeToFirst(DataNode node) {
        if(node == last && last.pre != null) { // bug, also need to update last pointer
            last.pre.next = null;
            last = last.pre;
        }
        if(node != first) {
            if(node.pre != null) node.pre.next = node.next;
            if(node.next != null) node.next.pre = node.pre;
            node.pre = null;
            node.next = first;
            first.pre = node;
            first = node;
        }
    }