copy some code from firewoes to handle incoming firehose