added iterator implementation