impl main proc thread & update timeout