now accepts custom output stream