edits to error analysis