implement Next for rdb