add iterator design pattern