added ping timeout of 2 seconds