added to split method to handle newlines and test that is OK