updated to read from body_stream if present