edits to error structure