update ping function