Add cal

You can determine the index of the label (and weight) column once up front, after you've parsed the header instead of recalculating for each line.