A1+A2 process , add function main_process and sub_process