Early implementation of Iterator pattern