added function and test for newline character
Added method for different delimiter and test for that