add an debug list walker function called displayList for debugging.