Optimize network