First step of network optimization