"fix PacketHandler, just use high-order function"