recursively reverse a linked lise