registering and responding to pings