updating CDM_search for new array structure