added subarray creation