modified for array within array