add output stream method