now handles newlines