added helper function and sorted parse-get-words output