Added ping function.