Its supposed to loop through the array components and put a different argument each time depending on current loop iteration but it keeps using the last iteration of the loo