generate an object iterator