able to push into array in a for loop