Iterator pattern using extension