optimize CCMIS with proper use of bitsets