added ping and timeout