changed 'newline' implementation