action refactor