refactoring - read_timeout does not yet work as input_stream is not buffering