finished code to read input text and print words and frequencies