add partial main process and worker process routine

add partial main process and worker process routine