implemented read_command_stream()