pa2 using a linkedlist