This is somewhat inefficient.. you should split only once and take both parts of the array then