added read_str and use it instead of read_bytes