output must be case folded