better constructor for Stream handler