partly made updating cursors
fix retract clauses & mistakes in next