added conversion from InputStream  to channel