HW 6 with beginning of linkedlist added