doc updates and use an iterator when querying resources.