network optimizing code