add apply to setCC function