ch-function Review and modify