Refactoring, invoke pre- and postDispatch method