properly output newlines