refactor actions