Added packet loss functionality.