ensure words is a list for reduce