add option to ignore newlines