implementing promises to catch the data / error from the ping