cursor for moving stream end + cleanup