move dispatch and disover in daemon