refactor: move action in separate file