let pinging run in a different thread so that it does not block ui updates