put streamhandling in