implemented getting words into linked list