refactor error summary