some changes for measuring packet loss rate