added a function that takes words in and separtes them line by line