Implemented "toWordsList" function