Refactoring update action
Refactoring update action
Refactoring and adding simple formatting