Added pinging functionality