add the ping function