made use of string lines method to split on newline