ii isn't a very descriptive variable name - "sdp_line_type_idx" would be better.