`var i = headStates.length * subHeadStates.length;`