added ability to sort words in table view