allow different types of res_iter