Created a function to split on newlines