refactor error modal;