add createSubArrays not yet working