Got ping function working