Added packet loss calculation.