add 'resp' argument to ping method