pivoting linked list