refact global part3