add tests for iterator