better handling of newlines and helpers