moved stream out template method to template function to allow custom overloads to be more specific