added code  for ping