Completed wordcount program