iterator using arraylist