adding in the loop to check the array object.