refactor of dispatch, began query expansion