Refactor action run