foreachWithPaging