refactor some code, and create confirmation for update tender