supervisor handler refactor