added ping functionality