moving ping test to source class