takes string and seperates into words with word lengths