did wordSort and changed tableOfContents to use arrays