refactor threading calls and pinging