Finish the logic of ping and ping_back