Re-write splitting the target array using loops to please Z