separate each network measurement into sub functions