average speed calculation based on links