began implementation of ping function