refactoring of action