refactor role