Improve control function's dispatching system