Only using head for reversing linked list