change the array handling