array for each loop using oop