edits to output and outputUpdate & rlib