dispatcher refactoring