refactor the dispatch calls