added code to produce words list