Initial implementation of ping function