k1, mahendra | changed algo to extract headers from cat option combos