Update ping function