Working version of the script that gets information about OPTIDX.