using the cursor to transact local state