function to create list of words is now perfect