added sendPing function