flipped the order, so it inserts the new node before removing the old one. key point here.