dispatcher: refactoring