void reverseList( struct node **headRef){
struct node *current = *headRef;
struct node *prev = NULL;
struct node *next;
while(current != NULL){
next = current->next;
current->next = prev;
prev = current;
current = next;
}
*headRef = prev;
}