added codes to handle applying cw to fields with multiple values