many updates for interactive mode and of document