demo for iterator