adding loading and error overlays