update action and refactoring