refactor dispatcher handle