message handling, responding to pings