use <pre> to display \n character easily and refactor by using presence method instead of present?