adding Iterator pattern