Improved ping calculations