changed to iterator