complex array processing